Estimate Logics Result
Estimates of how much funds will be spent (funds) and how many balances will be obtained (balances) from this transaction. It will also identify any approvals that the user needs to execute (approvals) before the transaction and whether there is any Permit2 data that the user needs to sign before proceeding (permitData).
In the current implementation of Permit2, users have two options for authorizing Agent
to spend their assets: permit
and approve
. These methods provide distinct approaches to token authorization, allowing users to choose the one that best suits their needs. If not specified, permit
is the default behavior.
The permit
method involves obtaining authorization data (permitData
) for the ERC20 tokens being spent in the router data. Users are required to sign this data. The permitData
and the associated signature are then sent to the Protocolink API as part of the transaction.
The approve
method provides users with the necessary transactions to approve the expenditure of ERC20 tokens in the router data. Users must complete these approval transactions before sending the router transaction.
The result contains a list of chains that looks the following:
Funds (Initial Funds)
This denotes the amount of initial funds required in the logic combination. For instance, if the subsequent logic generates tokens from the previous logic, then the user need not transfer them again, and thus they are not counted in the total.
Balances (You will receive)
This is a projection of the amount of money that will be refunded to your wallet upon completion of the transaction, which can be conveniently displayed to the user.
Fees
Protocolink will calculate fees based on the logics included in the transaction, which can be conveniently displayed to the user. You can refer to our Fees section for a list of logics that may incur fees.
Approvals
After the current estimation, there are transactions that necessitate user authorization, such as when a user uses Permit2 or borrows delegation for the first time.
PermitData
The first time the token is approved for Protocolink by Permit2, the user's signature is required. The default validity period of the signature is 30 minutes
, and the expiration time of the Token permit is 30 days
.
Last updated