Skip to content本文へ移動

HyperEVM Development · L1 Precompiles & Interop · 6/8

HyperEVM Contract Challenge

Test your knowledge of yield vault share-based accounting, deposit/withdrawal mechanics, and ERC-4626 vault patterns.

1. In a share-based vault, how many shares should be minted for the very first deposit of 1000 USDC?

2. A vault has totalAssets=11000 and totalShares=10000 (after yield accrual). If a new user deposits 1100 USDC, how many shares do they receive?

3. What should the share price return when the vault has zero total shares?

4. A user holds 500 shares in a vault with totalAssets=22000 and totalShares=10000. How much do they receive on withdrawal?

5. In vault simulation, what is the correct order of operations between deposits and yields?

HyperEVM 開発 · L1 の precompile と連携 · 6/8

HyperEVM コントラクトのチャレンジ

利回り vault の持ち分による計算、預け入れと引き出しの仕組み、ERC-4626 の vault の形について、理解を確かめます。

1. 持ち分方式の vault で、いちばん最初に 1000 USDC が預けられました。持ち分はいくつ発行すべきですか。

2. ある vault は totalAssets=11000、totalShares=10000 です(利回りが積み上がったあと)。新しいユーザーが 1100 USDC を預けると、持ち分はいくつもらえますか。

3. vault の持ち分の合計が 0 のとき、持ち分の価格は何を返すべきですか。

4. あるユーザーが、totalAssets=22000、totalShares=10000 の vault で 500 持ち分を持っています。引き出すといくら受け取りますか。

5. vault のシミュレーションで、預け入れと利回りはどの順で処理するのが正しいですか。