5. Preview the Estimated Post-Zap-Supply Position & Approval Permissions
Specify the srcToken, srcAmount that the user has, along with the destToken which represents the base or collateral tokens the user wants to supply. Then It returns a quotation used for getting the estimated position. approvals need to be signed and submitted on-chain. logics is the detailed steps used for building transaction. Logics workflow is as follows:
Swap the source token to the base or collateral token.
Provides transaction data that is needed to execute this operation. Armed with the logics from the previous step, it generates the to, data and value including fees then signs and submits to finalize the operation.
If you wish to include a referral for fee sharing, you can append the referral property to the routerData object. For detailed information on using routerData, please refer to the Router Data Documentation.