Fledging Security Researcher | Software Engineer | Onchain Enthusiast
ERC-165 Primer
OverviewERC-165 is an interface identification mechanism that enhances compossibility as contracts can determine whether a contract supports an interface at compile time.ERC-165 GoalPrior to ERC-165, there was no mechanism to check whether a contract supported a specific interface, such as ERC-20. Therefore, there was no way of verifying whether a contract could accept tokens or tokens sent to a contract would be ‘stuck’ and effectively lost.ImplementationERC-165 introduces a standardized fun...
ERC-165 Primer
OverviewERC-165 is an interface identification mechanism that enhances compossibility as contracts can determine whether a contract supports an interface at compile time.ERC-165 GoalPrior to ERC-165, there was no mechanism to check whether a contract supported a specific interface, such as ERC-20. Therefore, there was no way of verifying whether a contract could accept tokens or tokens sent to a contract would be ‘stuck’ and effectively lost.ImplementationERC-165 introduces a standardized fun...
Transparent Proxies & Upgradeability
The Goal of the Proxy PatternSmart contracts are immutable, therefore it is not possible to change the logic of a smart contract once it has been deployed. However, the ability to update code is often vital, whether to add new features or to patch critical bugs and defects. This is what the proxy pattern offers to developers, a means of updating code by introducing upgradeability to smart contracts. Upgradeability is achieved by separating storage and logic. A proxy contract contains the stat...
Transparent Proxies & Upgradeability
The Goal of the Proxy PatternSmart contracts are immutable, therefore it is not possible to change the logic of a smart contract once it has been deployed. However, the ability to update code is often vital, whether to add new features or to patch critical bugs and defects. This is what the proxy pattern offers to developers, a means of updating code by introducing upgradeability to smart contracts. Upgradeability is achieved by separating storage and logic. A proxy contract contains the stat...
ERC-1155 Primer
OverviewThe ERC-1155 standard specifies an interface that supports multiple tokens governed by a single contract. Additionally, tokens controlled by the contract can have different types of fungibility. Supported fungibility types include:Fungible (ERC-20 like)Semi-fungibleNon-fungible (ERC-721 like)It also introduces a number of QoL features, such as bulk approvals, where one approval applies to all token types held by the contract. This removes the need for users to approve an individual to...
ERC-1155 Primer
OverviewThe ERC-1155 standard specifies an interface that supports multiple tokens governed by a single contract. Additionally, tokens controlled by the contract can have different types of fungibility. Supported fungibility types include:Fungible (ERC-20 like)Semi-fungibleNon-fungible (ERC-721 like)It also introduces a number of QoL features, such as bulk approvals, where one approval applies to all token types held by the contract. This removes the need for users to approve an individual to...
I built an Onchain App
MotivationAs a long-time onchain enthusiast who has been dabbling in DeFi and battling with Metamask since 2020; I have always marvelled at the premier onchain apps. Apps like AAVE and UniSwap are so clean and always iterating and improving. Furthermore and perhaps most importantly, in the most adversarial environment imaginable with billions of dollars at stake, these apps have never been exploited. *I hope I didn’t just jinx that😬🤞* But since I have started using these applications, I hav...
I built an Onchain App
MotivationAs a long-time onchain enthusiast who has been dabbling in DeFi and battling with Metamask since 2020; I have always marvelled at the premier onchain apps. Apps like AAVE and UniSwap are so clean and always iterating and improving. Furthermore and perhaps most importantly, in the most adversarial environment imaginable with billions of dollars at stake, these apps have never been exploited. *I hope I didn’t just jinx that😬🤞* But since I have started using these applications, I hav...
I built an Onchain App: Front-end - Part 1
The code for the first stage of development explored in this article can be found here. Please use this to provide additional context in the event that any parts of this article are unclear. Additionally, if aspects of this article are unclear or do not follow best practices please let me on 𝕏.Project SetupSvelteKit InitialisationAs aforementioned in the previous article, I am using SvelteKit to build out my frontend. It is important to note that while Svelte recently announced the release o...
I built an Onchain App: Front-end - Part 1
The code for the first stage of development explored in this article can be found here. Please use this to provide additional context in the event that any parts of this article are unclear. Additionally, if aspects of this article are unclear or do not follow best practices please let me on 𝕏.Project SetupSvelteKit InitialisationAs aforementioned in the previous article, I am using SvelteKit to build out my frontend. It is important to note that while Svelte recently announced the release o...