2022-07-06
1700
#blockchain
Joel Adewole
123112
Jul 6, 2022 â‹… 6 min read

How to write an ERC-4626 token contract for yield-bearing vaults

Joel Adewole Jamstack web developer | Technical writer | React | Python

Recent posts:

Build an image editor with Fabric.js v6

In web development projects, developers typically create user interface elements with standard DOM elements. Sometimes, web developers need to create […]

Shalitha Suranga
Sep 9, 2024 â‹… 12 min read

Creating toast notifications using Solid Toast

Toast notifications are messages that appear on the screen to provide feedback to users. When users interact with the user […]

Chimezie Innocent
Sep 6, 2024 â‹… 7 min read
Deno Adoption Guide: Overview, Examples, And Alternatives

Deno adoption guide: Overview, examples, and alternatives

Deno’s features and built-in TypeScript support make it appealing for developers seeking a secure and streamlined development experience.

Emmanuel Odioko
Sep 5, 2024 â‹… 10 min read
Types vs. Interfaces in TypeScript

Types vs. interfaces in TypeScript

It can be difficult to choose between types and interfaces in TypeScript, but in this post, you’ll learn which to use in specific use cases.

Yan Sun
Sep 5, 2024 â‹… 9 min read
View all posts

One Reply to "How to write an ERC-4626 token contract for yield-bearing vaults"

  1. Great tutorial – really enjoyed it!

    One question – what is the purpose of the ‘shareHolder’ mapping here:

    // a mapping that checks if a user has deposited
    mapping(address => uint256) shareHolder;

    I would think that since each user is issued a vToken after deposit, there is really no explicit need to track deposits anymore, but I may be overlooking something. Hope to build a vault smart contract based on 4626 soon. Thanks!

Leave a Reply