Skip to main content
Calculates the expected account shares a user will receive for a deposit. Uses the on-chain exchange rate from the Accountant contract.

Import

Usage

Parameters

ParameterTypeRequiredDescription
vaultNamestringYesAccount name from getVaultsByConfig()
chainIdChainIdYesBlockchain network ID
depositAssetAddressAddressYesToken contract address being deposited
depositAmountstringYesAmount as decimal string (e.g., "1000.0")

Return Type

Example: Display Expected Shares

Error Handling

Error Message PatternDescriptionResolution
"No vault found"No account matches parametersVerify yieldType, asset, chainId
"SDK not initialized"SDK not initializedCall initAmplifySDK() first