Key ideas to understand before integrating Amplify Earn
Before wiring calldata into your product, align on how Amplify Earn models strategies, assets, and execution responsibilities. These concepts shape the SDK helpers referenced throughout the docs.
Unified API (Recommended): Use prepareDepositAuthorization() to automatically detect the optimal method. It returns the appropriate flow based on token support and existing allowances.
Approval flow: Traditional ERC20 approval using prepareApproveDepositTokenTxData() followed by prepareDepositTxData().
Permit flow: When the token supports EIP-2612, sign typed data off-chain and use prepareDepositWithPermitTxData() for gas-efficient single-transaction deposits.
The unified API handles method detection automatically—use it for the best developer experience.