Skip to content

@vault:convertToAssets

Amount of underlying assets an ERC-4626 vault would return for a given amount of shares, in base units of the asset.

⚗️ Experimental — available at next.evmcrispr.com.

Returns: number

@vault:convertToAssets(vault shares)
NameTypeDescription
vaultaddressERC-4626 vault address
sharesnumberShare amount, in base units (wei)
# Print the WXDAI value of one sDAI share
print "Share price:" @vault:convertToAssets(0xaf204776c7245bF4147c2612BF6e5972Ee483701 1e18)

Read convertToAssets(shares) at assertion time. A literal amount compiles to plain calldata; a live :: call folds into a core read splice.