Blockchain
-
Calculating The Intrinsic Value Of Bitcoin & Ethereum
Calculating the intrinsic value of Bitcoin, Ethereum and other digital assets is challenging due to its intangible nature. In this analysis I’m going to discuss common methods of calculating intrinsic value and then create a model using a combination of the methods. tl;dr based on the models described below: Methods Of Calculating Intrinsic Value Store…
-
The Essential Checklist For Deploying A New Token
In this article we are going to look at all the things that need doing when launching a new token to create a token deployment checklist for developers and founders. At the end there is a big list of all the token listing sites that you can submit your new token to. Unit Tests &…
-
Solidity Tutorial | Gas Paying NFT
The challenge is to create a NFT contract that charges 1 ETH to mint but then stores the entire amount as collateral in a liquid staking token. As staking rewards come in they get distributed to the holders of the NFTs. At any time a user can burn the NFT to reclaim the 1 ETH.…
-
Web3 PWA Boilerplate | How To Create Next Generation dApps
One of Web3’s biggest issues is getting around the centralization of app stores and their stringent terms on the commission requirements for digital asset payments and transfers. Progressive Web Apps (PWAs) in my opinion are the best solution as it allows you to install dApps directly on to a mobile device without using the app…
-
Chainlink CCIP | Cross-Chain Interoperability Protocol
From all the announcements at ETHcc, the release of Chainlink CCIP as a direct competitor to LayerZero for cross-chain communications and bridging technology, is perhaps the most interesting. The inherent security risks associated with bridging technology means that Chainlink are in a good position to leverage their brand and security record to gain traction in…
-
Biggest Misconceptions About Crypto User Demographics
Due to my blog and YouTube channel I get detailed analytics on crypto user demographics. In this article I’ve compared my own data with other accounts, studies and published demographic information. My Demographic Data Here are some screenshots from Google Analytics and YouTube. My content is almost solely focused on blockchain, web3, crypto. This data…
-
Using Ethereum To Offset Bitcoin’s Carbon Footprint
Never have I sounded more like an Ethereum maxi, but there is a point beyond the provocative title. In this post I’m going to explore the potential for investors to use carbon credit tokens on Ethereum to offset the electrical consumption of BTC mining on their Bitcoin holdings. This novel idea provides the opportunity to…
-
Spark Protocol sDAI | DeFi Analysis Report
Does earning 8% on your DAI stablecoin holdings sound too good to be true? Let’s take a look at how Spark Protocol is offering this APR using MarkerDAO’s Enhanced Dai Savings Rate system. This is a write up of my internal research notes, this is not a sponsored post and I do not hold any…
-
Value Averaging vs Dollar Cost Averaging
One of the most recognized techniques for investing is dollar cost averaging. A process where you invest equal amounts over set periods i.e. $100/month. A less well known strategy is value averaging which when compared across multiple markets and time frames is more effective. In this article I discuss the concept of value averaging, the…
-
A Close Look at PYUSD | Implications Of The PayPal Stablecoin
In August 2023 Paypal unveiled their new stablecoin, an ERC20 token built on Ethereum. The code is open source, the contract is verified on Etherscan, it’s a real token which is going to be available to Paypal’s 435m users. What Is pyUSD & How Does It Work The Paypal stablecoin was developed in partnership with…
-
How To Shuffle A Deck Of Cards In Solidity
In this post I explore how to simulate the shuffling of a deck of cards, addressing the challenges of randomness and predictability in a solidity smart contract environment where every input and output is part of the public record. Whether you’re looking to create an on-chain poker game, a collectible card game, or you’re simply…
-
The Secrets Web3 Marketers Use To Launch New Crypto Projects
My previous background in digital marketing and now having worked in the blockchain sector for 6 years provides unique vantage point on the differences between conventional and web3 marketing. Successful crypto projects create communities of advocates who act as micro-influencers championing the cause. In this article I’ll discuss why “build it and they will come”…
-
Crypto Travel Rule | Creating A Surveillance State
From the 1st September 2023 the crypto travel rule will come into force in the UK, the EU is holding a grace period with plans to bring it in towards the end of 2024 and it’s already in place in the US, Canada and other parts of the globe. What Is The Crypto Travel Rule…
-
Card Payments For Crypto With Wert
One of the challenges cryptocurrency projects face is the seamless integration of traditional payment systems, such as credit/debit card payments, into their crypto based ecosystems. The issue derives from the potential for fraud because card payments can be reversed long after the transaction has taken place, while crypto transactions are immutable. This is a write…
-
Tokenized US Treasuries | Ondo Finance vs MatrixDock
Tokenized US treasuries offer a yield on stablecoin holdings and with rising interest rates they are quickly gaining traction in DeFi markets. In this article I want to look at two projects to see how they compare and how the real world asset ecosystem is shaping up. Real World Assets In the last six months…
-
How Many People Own Bitcoin & Ethereum?
No one can provide an exact answer to “how many people own Bitcoin” or “how many people own Ethereum” because a single user can have multiple anonymous addresses on the network. We can however analyse the data available in block explorers, company reports and research posts to make an estimate. tl;dr estimates based on the…
-
Automate Solidity With MEV
There are no cron jobs in Solidity or native to the Ethereum blockchain. To automate Solidity code we can either use an external service/oracle or we can incentivise MEV searchers to complete tasks efficiently on our behalf. This type of Solidity automation is very common and used widely across liquidation systems which require reliable, fast,…
-
Solana SoLang Tutorial | How To Deploy Solidity On Solana
In this SoLang tutorial I’ll show you how to deploy Solidity code on Solana. We will start by setting up a dev environment before looking at some of the nuances in writing SoLang contracts. I’ll end on a few security considerations and a comparison to developing on Solana with SoLang vs Rust. Setting Up A…
-
Hop Exchange | DeFi Analysis Report
Hop Exchange is a bridging protocol that facilitates cross-chain token transfers by utilizing a network of bonders. I first heard it mentioned in a keynote by Vitalik at ethGlobal Waterloo. This is a write up of my internal research notes, this is not a sponsored post and I do not hold any exposure to Hop…
-
Infura vs Alchemy
Most users connect to blockchains using RPC node services. This is sometimes taken care of in the background, for example Metamask uses Infura nodes to send and receive transactions. Web3 developers use custom RPC nodes for their deployment scripts and transactions. Operating the nodes requires a reliable infrastructure service, and two of the most popular…
-
ETHx Stader Labs | DeFi Analysis Report
ETHx from Stader Labs is a solution committed to decentralization and keeping Ethereum accessible, reliable, and rewarding. Having just launched ETH stakers earn 1.5x staking rewards and $800,000 in DeFi incentives across various protocols for the first month. This is a write up of my internal research notes, this is not a sponsored post and…
-
Conic Finance | DeFi Analysis Report
The latest development in the Curve Wars is the establishment of a new player. Conic Finance is gaining traction and becoming a significant player in the stable swap ecosystem. This is a write up of my internal research notes, this is not a sponsored post and I do not have any allocations at time of…
-
Building LayerZero OFT Tokens In Solidity
LayerZero OFT tokens are a new standard for cross-chain assets. OFT’s (Omnichain Fungible Tokens) are not actually tokens themselves, but rather a set of instructions that tell LayerZero how to transfer tokens between different blockchains. In this tutorial we will be building a LayerZero OFT ERC20 token using Solidity and Remix. How LayerZero OFT Tokens…
-
XRP Legal Case | What It Means For Developers
In this article I’m going to be breaking down the document filed by judge Torres yesterday and consider what it means to developers working in the blockchain and web3 space. Highlights From The Ruling The full document is available here:https://www.nysd.uscourts.gov/sites/default/files/2023-07/SEC%20vs%20Ripple%207-13-23.pdf I’ve picked out some highlights Programmatic SalesHaving considered the economic reality of the Programmatic Sales,…
-
Uniswap v4 Hooks
Hooks in Uniswap v4 are external contracts that execute specific actions at certain points during the execution of a liquidity pool. These hooks provide flexibility and customization options for developers to create additional features for liquidity pools. Uniswap v4 hooks can be used to: A 3rd party developer can write a solidity hook contract with…
-
crvUSD Curve Stable | DeFi Analysis Report
Curve finance recently launched their own stablecoin crvUSD. I was lucky enough to meet one of the developers working on crvUSD at ethDenver and have been impressed with the product and how it has been rolled out. It is an algorithmic stablecoin with massive potential backed by one of the biggest names in DeFi, let’s…
-
3 Ways To Raise Web3 Funding
In this article I’ll explore 3 ways in which you can raise funds for your project with web3 products. Membership NFT A NFT is a non-fungible token, they are often represented as a unique image which can contain additional rights such as: To execute a NFT drop, the following steps can be taken: If any…
-
Solidity Error Codes | Not Always What They Seem
I get a lot of comments from Solidity tutorial videos and in Github issues asking how to resolve common solidity error codes. In this article I’ll go through some of the most frequent solidity issues, what they mean and how to resolve them. UNPREDICTABLE_GAS_LIMIT This is the most common and confusing error in Solidity The…
-
FTX 2.0 ReLaunch
FTX 2.0 is a proposed relaunch of the cryptocurrency exchange FTX.com, which filed for bankruptcy in November 2022. The FTX exchange was a profitable business, earning a small percentage from trading fees. However depositors funds were used to cover up losses from partner trading firm Alameda Research. Alameda also provided market maker services across all…
-
Raft Finance | DeFi Analysis Report
This DeFi analysis report for Raft Finance follows up on my analysis and investment in Lybra Finance. This is a write up of my internal research notes, this is not a sponsored post and I do not have any allocations at time of writing to Raft or the R stablecoin. Do your own research, not…
-
Can London Become A Crypto Hub?
Earlier this week one of Silicon Valley’s largest VC firms Andreessen Horowitz announced it would be opening an office in London for their a16zCrypto arm. In this article we will look at how well positioned the UK is relative to the rest of the world to become a fintech capital and hub for the blockchain…
-
Lybra Finance | DeFi Analysis Report
Lybra Finance allows stETH stakers to mint the eUSD stablecoin which has a 7.2% APY. This is a write up of my internal research notes, this is not a sponsored post however I have purchased an allocation of LBR Lybra Finance’s governance token in my personal portfolio. Do your own research, not investment advice. Update…
-
Raising Funds For Your Blockchain Project
For founders looking to raise capital there are a number of options which we will explore in this article. Private Round A private round is where a founder will outreach and pitch their concept to investors in the space. For raises under $100k angel investors can provide initial funding to get a project started. For…
-
Prisma Finance | acUSD an LST backed stablecoin
Prisma Finance is a DeFi project that aims to maximize the potential of Ethereum liquid staking tokens (LSTs). It introduces a stablecoin called acUSD, which is over collateralized by liquid staking tokens. The stablecoin is designed to be capital-efficient and offers additional incentives through integration with Curve and Convex Finance. This is a write up…
-
Assessing Smart Contract Security Auditors
A smart contract audit can cost anything from $5,000-$250,000 USD. Within this range there is a wide range of services, some offer better value for money than others. In this article I will go through the options for founders looking to hire an auditor and some of the checks you can do to ensure you…
-
Proposer Builder Separation
Proposer Builder Separation (PBS) is an Ethereum concept that aims to reduce relay centralization and redirect a proportion of MEV to validators staking Ethereum. In the current Ethereum network, validators are responsible for both proposing and building blocks. They are incentivised to coordinate with 3rd party MEV protocols which order the transactions in the blocks.…
-
Alchemix Self-Repaying Loans
Imagine a financial system where your loans automatically pay themselves off, interest-free and without the need for monthly repayments. Alchemix is a synthetic asset protocol run by community DAO. This is a write up of my research notes and is not sponsored in any way. I currently at time of writing have no stake in…
-
Effective Altruism | Leveraging Innovation & Transparency for Social Good
Effective altruism is a philosophy rooted in maximizing the positive impact of our actions to improve the lives of others. It has gained significant traction in recent years, especially among proponents in crypto circles who resonate with the data driven approach. This article explores how effective altruism, when combined with innovation and transparency, becomes a…
-
Gnosis Safe | The Most Secure Multisig Wallet For Your Crypto
Gnosis Safe multisig wallets are used by institutions and individuals to hold some of the largest quantities of funds on the Ethereum network. The free to use wallet includes multisignature functionality for enhanced security and control over digital assets. It is developed by Gnosis, a blockchain technology company based out of Switzerland and Germany, known…
-
Ethereum Improvement Proposal | How To Submit An EIP
Submitting an Ethereum Improvement Proposal (EIP) is a straightforward process that allows you to contribute your ideas and suggestions to the Ethereum community. Here’s a step-by-step guide on how to submit an EIP: What Is An Ethereum Improvement Proposal An Ethereum Improvement Proposal (EIP) is a formal document that provides technical specifications and rationales for…
-
Ultimate Guide To Hire A Solidity/Web3 Developer
In this comprehensive guide, I will explore how to hire a Solidity/Web3 developer. Contractor, Partner or Employee The first thing you need to decide is whether you want to hire someone on a permanent basis or not. With Solidity development the contracts don’t tend to get updated once they are deployed so the bulk of…
-
How Wrapped Tokens Like wETH & wBTC Work
In this article we will look at how different wrapped tokens work and where the underlying collateral is stored. What Are Wrapped Tokens? Wrapped tokens are generally ERC20 tokens that represents another underlying asset, typically a cryptocurrency or real world asset. The purpose of wrapping a token is to enable its use within the DeFi…
-
3 Tips For Gas Efficient Solidity Smart Contracts
Here are 3 tips which could be considered the low hanging fruit of gas efficient solidity smart contracts. James On YouTube Watch On YouTube: https://youtu.be/xfNHzqkMWEQ |Subscribe Use Correct Modifiers & Declarations This is the simplest way to get some small wins with gas optimisation. Go through your contract and define anything that shouldn’t change as…
-
Snapshot | Gasless Voting for Decentralized Communities
In decentralized communities voting plays a crucial role in governance and development of roadmaps. Snapshot is disrupting the traditional DAO voting model with a gas free voting platform. This is not a sponsored post and I have no stake in Snapshot, I do however like to use and promote open source tools which enable decentralized…
-
Is My Token A Security? The Howey Test For Digital Assets
The SEC & Securities Regulations The Securities and Exchange Commission (SEC) is an independent agency of the United States federal government that is responsible for regulating securities and protecting investors. In practice they have done more to protect Wall Steet financial institutions than they have ever done for individual investors. The SEC regulates securities through…
-
Introduction to Flash Loans | Unleashing Capital On Demand
In this tutorial on flash loans we will be creating a Solidity smart contract which takes a flash loan from Uniswap v3. This allows you to borrow huge amounts of capital with the catch that you have to pay it back in the same block or the whole transaction is reverted. James On YouTube Watch…
-
Uniswap Market Maker Bot | Managing Token Liquidity On Uniswap
In this tutorial I am going to go through how I built a market maker bot to manage liquidity on Uniswap v3 for a token pair. The idea is to create a automated trading bot which buys tokens when price falls below a base line value and sells tokens when price is above the base…
-
Ethers vs VIEM | Which Web3 Frontend Library?
Ether.js took over from Web3.js as the number one library for connecting up our dApps to smart contracts running on EVM blockchains. Recently Ethers v6 was released and VIEM is disrupting the space by offering a lightweight Ethereum client library from the authors of WAGMI react hooks. I have always been a big fan of…
-
Trading The Lifecycle Of Crypto Narratives
The blockchain sector moves fast and attention shifts rapidly as crypto narratives emerge inflating valuations for sub-sectors before moving on to the next big thing. In this article I’m going to outlay my research into the lifecycle of crypto narratives to explore how we can best position our portfolios and allocate funds in a +EV…
-
Defending Against Sandwich Attacks and MEV | A Guide to Flashbots Protect
By using a private mempool such as Flashbots protect, Ethereum users can protect themselves against MEV (maximum extractable value) including sandwich attacks. It doesn’t cost anything to use and is easy to setup with existing digital wallets, such as Metamask. Sandwich Attack Protection MEV refers to the potential profit that miners can extract from the…
-
How To Create A BRC20 Bitcoin Token
In this tutorial we will create our own BRC20 token on the Bitcoin network. James On YouTube Watch On YouTube: https://youtu.be/6eTN2fVd4Pw |Subscribe What are BRC20 Tokens? BRC20 tokens are created using the Bitcoin Ordinals protocol. The Ordinals protocol is a set of rules that govern how inscriptions are created, transferred and managed. Bitcoin and the…
-
Hyperledger Fabric | IBM’s Enterprise Blockchain
Hyperledger Fabric is a permissioned blockchain platform designed for developing enterprise grade distributed ledger applications. How Does Hyperledger Fabric Work? Hyperledger Fabric uses a pre-authorised network of nodes, with each node storing a copy of the blockchain ledger. It is EVM based which means you can run Solidity code there, all be it with some…
-
Taproot Explained | Beneficial For Bitcoin?
The Taproot Bitcoin upgrade was activated on November 14th 2021. It was designed to improve privacy, efficiency and the network’s ability to process custom logic. The upgrade inadvertently made it possible to link metadata to Bitcoin transactions. By using ordinal theory it is possible to inscribe each satoshi (lowest denomination of Bitcoin) with a corresponding…
-
How To Create Your Own Memecoin With Solidity and Uniswap
In this tutorial we will be creating a permissionless, ERC20 memecoin and deploying it with a Uniswap v3 liquidity pool so users can buy it on the decentralized exchange. This tutorial is for demonstration purposes, don’t speculate on memecoins. James On YouTube Watch On YouTube: https://youtu.be/-bVzqtIa0bc |Subscribe The full source code for this is at:…
-
What is Pepe | A Memecoin Story
The Pepe memecoin is a cryptocurrency based on the Pepe the Frog meme, which originated on the imageboard website 4chan in 2005. The meme gained mainstream popularity in 2016 when it was adopted by supporters of then-presidential candidate Donald Trump. PepeToken is an ERC20 token on the Ethereum blockchain. It is widely traded across many…
-
MEV Uncovered | The Dark Side Of DeFi
MEV (Maximal Extractable Value) is a term used to describe the maximum value that can be extracted from block production beyond the standard block reward and gas fees by including, excluding, and changing the order of transactions in a block. MEV can be thought of as the economic value that arises from the ability to…
-
RDNT v2 Radiant Capital | DeFi Analysis Report
Earlier this year Radiant Capital launched Radiant v2, an omnichain lending protocol. This is a write up of my internal research notes, this is not a sponsored post and I have no allocation at time of writing in Radiant or RDNT. Radiant is a DeFi platform that allows users to lend and borrow digital assets…
-
Protodanksharding & Danksharding Explained
Protodanksharding and Danksharding are two approaches to scaling the amount of data on-chain for a future version of Ethereum. The goal of both upgrades is to ensure that the data on-chain is made available to archiving parties when it was first posted. This is accomplished through a technique called Data Availability Sampling (DAS). When &…
-
Will Quantum Computing Break Bitcoin?
Quantum computing has the potential to transform the way we solve complex problems in various fields, including cryptography. It offers a unique approach to problem solving that can break certain cryptographic algorithms and create new opportunities for cryptography. Bitcoin uses a combination of SHA256 hash functions and secp256k1 elliptic curve (ECDSA) cryptography to secure transactions.…
-
Quadratic Voting | Make Democracy Great Again
Quadratic voting has gained popularity in recent years through adoption on applications such as Gitcoin Grants. Quadratic voting has the potential to fundamentally improve how public decisions are made. This essay will explain what quadratic voting is, how it works and what problems it solves. How Quadratic Voting Works The process of quadratic voting involves…
-
Technical Analysis For Crypto Degenerates
For cynics technical analysis is seen as astrology for middle aged white guys for others it is the holy grail, which when mastered, inevitably leads to trading success. The truth is somewhere in the middle, it is undeniable that price action reacts more at some levels than others. It’s important for anyone involved in investing…
-
Asymmetric Cryptography Explained
Asymmetric cryptography uses different keys for encrypting and decrypting data. The key used for encryption is called the public key, and the key used for decryption is called the private key. Asymmetric cryptography schemes are used for secure communication over insecure channels, such as the internet. It is used in blockchain networks for users to…
-
What is DVT? | Distributed Validator Technology
Distributed Validator Technology (DVT) enables a group of network validators, in a proof of stake system such as Ethereum, to act as a single validator. This can create a form of decentralized staking solution for the network which is more censorship resilient and secure. What Is DVT? The role of providing a consensus mechanism has…
-
Advice For Hackathons | 9 Tips For Competing In Hackathons
Hackathons are a great way to socialise with other developers and build projects over a short period of time for fun and profit. James On YouTube Watch On YouTube: https://youtu.be/mnBofeo1Ib0 |Subscribe Work on something you are passionate about This starts with choosing a hackathon that is based on tech that you are interested in. I’m…
-
Frax Finance | DeFi Analysis Report
Frax is a growing ecosystem of DeFi products built on Ethereum. This is a write up of my internal research notes, this is not a sponsored post and I have no stake currently in Frax or FXS. What Is Frax? Founded in 2019 by Jason Huan, Sam Kazemian & Travis Moore. Frax has a legal…
-
Monolithic vs Polylithic Blockchains
Bitcoin is a monolithic blockchain, consensus is achieved on a single chain where all state data is stored. The Cosmos ecosystem is an example of a polylithic chain where there are multiple sub-chains running under a single consensus client. Monolithic Blockchains Monolithic blockchains are single-chain protocols where all functionalities including programmability through smart contracts, consensus…
-
Web3 Investment Thesis
This Web3 investment thesis covers the potential disruption from decentralized permissionless computing. As blockchains scale it’s going to be possible to use smart contracts to enable users to store their own data creating the opportunity for a new era of decentralized applications. Web3 Disrupting Data Web3 disrupts the way we store data online by using…
-
Private Funding vs Public Funding Rounds | How To Raise Capital In Crypto
Since the 2018 ICO bust, venture capital funding has become the primary avenue for blockchain startups to raise money. This comes with pros & cons which we will explore in this article alongside how raising capital works in the blockchain sector. How Private Funding Rounds Work During a private funding round the founders of a…
-
Blockchain Jobs | A Definitive List Of Roles & Salaries In Crypto
With the growing popularity of digital assets and decentralized finance, blockchain jobs are becoming increasingly lucrative and desirable. If you’re looking for a career with the potential for innovation, challenge, and outstanding opportunity, this list will guide you though the different jobs in the blockchain sector and what to expect. Executive Blockchain Jobs The founders…
-
DeFi Futures – GMX vs DyDx
Trading DeFi Futures products on decentralized exchanges such as GMX and DyDx has never been easier. The user experience is getting close to on par with centralized exchanges. Liquidity however, not so much… In this article we will look at how DeFi futures work, the market opportunity for decentralized futures exchanges and the two most…
-
Account Abstraction – ERC4337
ERC4337 is an Ethereum standard that achieves account abstraction on the protocol without any consensus-layer changes. Deployed on the Ethereum mainnet in March 2023, ERC4337 makes it possible to transact and create contracts in a single contract account. Account abstraction opens the door to user-friendly crypto wallet designs that could potentially facilitate broader adoption. How…
-
CAP Theorem & The Blockchain Trilemma
CAP Theorem states that a distributed system can deliver only two of three desired characteristics: Consistency, Availability, and Partition tolerance. In this article I’ll explore what CAP theorem is and how it relates to blockchain technology. What is CAP Theorem CAP theorem, was introduced by Eric Brewer in 1998 and proven as a theorem in…
-
Bitcoin Ordinals
Bitcoin ordinals are a means of creating NFTs by attaching data such as images, videos, and more to an individual satoshi on the base Bitcoin blockchain. They use an arbitrary but logical ordering system called ordinal theory to give each individual Bitcoin satoshi a unique non-fungible reference. What Are Bitcoin Ordinals? Bitcoin ordinals, also known…
-
Solidity vs Vyper
Solidity and Vyper are the two most popular programming languages for blockchain developers on Ethereum. Both of these languages have their own strengths and weaknesses which we will go through to help developers decide which is best suited for their project. Solidity Solidity is the most widely used programming language for developing smart contracts on…
-
Sign In With Ethereum Tutorial
To sign in with Ethereum using Metamask we will be using the ERC4361 specification that allows Ethereum accounts to authenticate with off-chain services using a standard message format. This technology offer users a self-custodial alternative to centralized identity providers that generally use email:password credentials. In Web3 applications we can improve user experiences and establish a…
-
EigenLayer | DeFi Analysis Report
EigenLayer is a protocol which allows Ethereum stakers to restake their ETH. This is a write up of my internal research notes, this is not a sponsored post and I have no stake currently in EigenLayer. EigenLayer is being developed by EigenLabs which is headed by CEO Sreeram Kannan. Sreeram has an academic background and…
-
Solidity Callback | Solidity Tips & Examples
A callback function in Solidity allows us to pass a function reference from one contract to another and have it execute as part of an atomic transaction. James On YouTube Watch On YouTube: https://youtu.be/pjm0eOelPXc |Subscribe Let’s first take a look at an example from the Solidity Snippets Github repo. Full code at: https://github.com/jamesbachini/Solidity-Snippets/blob/main/contracts/Callback.sol This code…
-
Strings in Solidity | Solidity Tips & Examples
A string in Solidity is a data type used to store text. Working with strings in Solidity can be challenging due to the limitations and efficiency required by the Ethereum virtual machine. This article aims to provide a comprehensive guide on how to use strings in Solidity, covering their properties, limitations, and best practices for…
-
Renegade Dark Pool DEX
Renegade is a new type of decentralized exchange that utilizes a dark pool to provide MEV resistant private transactions. This is a write up of my personal research, is not a sponsored post and I currently hold no stake in Renegade. What Is Renegade? The Renegade whitepaper was authored by Christopher Bender and Joseph Kraut.…
-
Timestamp in Solidity | Solidity Tips & Examples
A timestamp is a numerical value that represents a specific moment in time. It’s often used to track when a certain event occurred or when a piece of data was created or modified. The most common way to represent a timestamp is by using the number of seconds that have elapsed since a specific moment…
-
encodeCall in Solidity | Solidity Tips & Examples
From Solidity version 0.8.11 we can use an interface to define a function to pass to encodeCall parameters. encodeCall is a function that allows you to encode a function call with its parameters into a single byte array. This byte array can then be used to make a low-level call to another contract’s function. Here…
-
GammaSwap Pepetual Futures | DeFi Analysis Report
GammaSwap is a decentralized exchange that allows perpetual leverage trading on any token without liquidation risk from price movement, while also offering additional yield to liquidity providers through borrow fees. In this article I will write up my internal research notes, this is not a sponsored post and I currently have no stake in GammaSwap.…
-
Custom Error Handling in Solidity | Solidity Tips & Examples
Custom error handling enables Solidity developers to efficiently handle reverts and failed transactions including logging parameters. Let’s first take a look at an example from the Solidity Snippets Github repo: Note that the Solidity compiler version must be greater than 0.8.4 to use custom errors. Customer errors are supported by Etherscan and most other block…
-
Timeswap v2 AMM Money Market | DeFi Analysis Report
Ricsson Ngo took inspiration from Uniswap and set out to build a permissionless money market. The idea evolved into Timeswap which recently launched on Arbitrum. In this article I’ll write up my own notes and internal research on the protocol. Note this is not a sponsored post and I don’t currently hold any stake in…
-
Solidity Libraries | Solidity Tips & Examples
A solidity library is a reusable contract that contains functions that can be called by other contracts. When you import a Solidity library into your contract, you can use the functions provided by the library. How To Import Solidity Libraries In your smart contract, you can import the library by using the import keyword followed…
-
Random Numbers in Solidity | Solidity Tips & Examples
Generating a random number in Solidity is not as straightforward as in some other programming languages, because the Ethereum blockchain is deterministic, meaning that multiple execution clients or nodes must come to the same conclusion about the state of the blockchain. For many use cases using the new prevrandao global variable provides “good enough” randomness…
-
Conditional Statements & Loops in Solidity | Solidity Tips & Examples
Conditional statements & loops in Solidity are fairly intuitive and follow the conventions of other languages such as Javascript. In this article we will go through some examples of each before looking at the relational operators we can use within these statements. if statement The “if” statement is used to execute a block of code…
-
Natspec in Solidity | Solidity Tips & Examples
Natspec comments are important for Solidity developers to understand because sooner or later you will come across a code base that requires you work with them. Proponents will say Natspec makes the code more readable and understandable. While I personally disagree with this and prefer to separate code and documentation, the format is popular and…
-
ERC1155 Token Contract | Solidity Tips & Examples
ERC1155 offers a more flexible and efficient way of managing fungible and non-fungible tokens, making it an attractive option for developers who want to create complex digital assets with multiple use cases. In this blog post, we’ll dive into the details of ERC1155 and explore why it’s becoming a preferred choice for Solidity developers looking…
-
ERC721 Token Contract | Solidity Tips & Examples
The ERC721 Token contract is the original industry standard for NFTs (Non-fungible tokens). In this article we will look at a simple example and talk about some of the best practices around building ERC721 Tokens. James On YouTube Watch On YouTube: https://youtu.be/B64VBGt3tMU |Subscribe Why Use ERC721 Token ERC721 is a standard interface for NFTs on…
-
ERC20 Token Contract | Solidity Tips & Examples
ERC20 tokens have become the de facto standard for creating tokens on Ethereum and are widely used in many DeFi protocols for things like governance and utility tokens. Why Use ERC20 Token Solidity developers use ERC20 tokens because they are the industry standard for fungible tokens (where every token is equal to another one). The…
-
Merkle Tree in Solidity | Solidity Tips & Examples
Merkle Trees provide an efficient way to verify data in Solidity. This reduces the gas cost for on-chain storage when validating large data sets such as a large list of addresses. James On YouTube Watch On YouTube: https://youtu.be/NTPpyL4pJG0 |Subscribe How Do Merkle Trees Work Merkle trees are a data structure that allow efficient and secure…
-
How To Emit Events in Solidity | Solidity Tips & Examples
A Solidity Event is a way for smart contracts to communicate with the outside world by providing a mechanism for emitting messages that can be observed by external applications. It’s like a signalling message that is broadcast when a certain condition is met within the smart contract. Emitting Events In Solidity Here is a simple…
-
Bulk Send Tokens & ETH Contract | Solidity Tips & Examples
Sending payments in bulk can be a tedious and time-consuming process, especially when dealing with a large number of recipients. However, with a Solidity smart contract, bulk payments can be executed in a matter of seconds, providing a more efficient and cost-effective solution for managing bulk transfers. In this article, I will walk you through…
-
Multiple Return Values | Solidity Tips & Examples
In Solidity we can multiple return values from a function. This enables us to efficiently move data about within the application flow of a smart contract. In this example we are returning three variables enclosed within brackets. Note that the data types of these variables are defined at the top of the function in the…
-
Modifiers in Solidity | Solidity Tips & Examples
Modifiers in Solidity are a way to add a certain condition to functions within a smart contract. They allow developers to define a piece of code that can be reused across multiple functions and contracts, making your code more modular and easier to read. A modifier is defined using the modifier keyword, followed by a…