Implementation Path

How the Popcorn Adapter Vault Works

Reconstruct the core Popcorn vault implementation: an outer vault that routes assets into an ERC-4626 adapter, owns adapter shares, derives total assets from the adapter position, and charges fees by issuing vault shares. Follow the real deposit, mint, withdraw, and redeem flows before investigating the implementation in the lab.

DifficultyGuided
Estimated1h
Versionv0.1.0
AvailabilityAvailable

Popcorn uses a layered vault architecture. Users interact with the outer Popcorn Vault, while the deposited assets are forwarded into an ERC-4626 adapter that manages the underlying position.

This creates two ownership layers: users hold Popcorn vault shares, and the Popcorn Vault holds adapter shares. The value of the outer vault therefore depends on the assets represented by its adapter position.

Learning objectives

  • Trace assets through the outer vault and adapter

  • Distinguish Popcorn shares from adapter shares

  • Understand how totalAssets is derived from the adapter position

  • Follow deposit, mint, withdraw, and redeem flows

  • Understand how fees are collected by issuing shares

Path takeaway

By the end of this path, you should be able to recognize an outer ERC-4626 vault, identify its adapter position, and trace value across both accounting layers.