December 2024
-
Best Practices for Storing Large Data in Solidity
Blockchain storage is limited and block space is therefore expensive, especially at times of peak congestion. Solidity developers must employ strategies to optimise data storage whilst maintaining the integrity and accessibility of their smart contracts. One of the most effective approaches is to leverage off-chain storage solutions. Instead of storing large data sets directly on…
-
Understanding The Fallback & Receive Functions In Solidity
Among Solidity’s essential features are the fallback and receive functions, which play crucial roles in handling Ether transactions and contract interactions. A thorough understanding of these functions is vital for developers aiming to create robust and secure smart contracts. The Fallback Function In Solidity, the fallback function is a unique, unnamed function that executes under…
-
The Hidden Deflation of Digital Assets
The Inevitable Loss Facing Early Cryptocurrency Hodlers Substantial amounts of digital assets are going to be lost forever over the next few decades. The first generation of crypto hodlers will be dying off and many of their holdings will die with them. These losses, often caused by misplaced private keys or forgotten passwords, add an…
-
Programmatic Stellar Transfers
In this tutorial we will be setting up scripts to send and monitor transfers on the Stellar network. James On YouTube Watch On YouTube: https://youtu.be/gVC5ijif2-0 | Subscribe I’ll be using Node.js and the Stellar-SDK library. All the code is open source and you can fork the repository here: https://github.com/jamesbachini/Stellar-Cross-Border-Test There are two scripts, send.js and receive.js, created to…
-
Optimizing Smart Contracts For Layer 2 Chains
Layer 2 solutions have emerged as a crucial component in addressing scalability issues. Optimising smart contracts for these Layer 2 chains is essential to harness their full potential. This article explores key considerations for developers working with Layer 2 solutions, focusing on cross-chain interoperability, gas fees, and frontend considerations. Cross-Chain Interoperability When optimising smart contracts…
-
How Often Should I Rebalance My Portfolio
In this tutorial I modelled the optimal rebalancing frequency for a digital asset portfolio holding: This is a 60/40 crypto portfolio which I’ve discussed before. You can run the code with different assets (anything with a historical price feed). Starting with a $10,000 initial investment, the code allocates the funds accordingly and tracks performance over…
-
Creating Custom Solidity Libraries For Reusable Code
Solidity libraries enable blockchain developers to create modular reusable code. This shared usage avoids duplicating code, saves gas during deployment and promotes consistency within a code base. Let’s create a basic library that demonstrates how this works: This code defines a simple smart contract that utilises a library for basic arithmetic operations. The MyMath library…