calculateOfferFees and offerFeePercentage.
Import
Usage
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
yieldType | YieldType | Yes | Yield strategy type |
chainId | ChainId | Yes | Blockchain network ID |
assetAddress | Address | Yes | Asset address for vault lookup |
amount | string | Yes | Withdrawal amount as decimal string |
offerAsset | Address | Yes | Vault share token address |
wantAsset | Address | Yes | Token the user wants to receive |
receiver | Address | Yes | Address receiving the withdrawal |
Return Type
Example: Fee Preview
Error Handling
| Error Message Pattern | Description | Resolution |
|---|---|---|
"No vault found" | No vault matches parameters | Verify yieldType, asset, chainId |
"SDK not initialized" | SDK not initialized | Call initAmplifySDK() first |
Related
- Withdrawals Guide - Complete withdrawal flow
- getMinimumWithdrawalOrderSize - Minimum order size