Interactive Security
When interacting with the nexroute router contract, you must adhere to the following guidelines:Allowance Management
- Caller Responsibility: You are solely responsible for managing token allowances.
- Revocation: It is best practice to reset allowances to zero (
0) immediately after a transaction completes or fails. This mitigates the risk of unlimited and leftover approval vulnerabilities.
Slippage Protection
- Caller Responsibility: You are solely responsible for defining and enforcing slippage checks.
- Verification: Always verify that the
amountOutMinimum(or equivalent parameter) in your transaction ensures acceptable trade outcomes. nexroute provides the quote, but you must ensure the execution meets your safety thresholds.
Deadline Validation
- Caller Responsibility: You must ensure that transactions do not hang indefinitely in the mempool.
- Implementation: Set a reasonable
deadlinetimestamp for your transactions. If the transaction is not mined by this time, it should revert to prevent execution at an unfavorable rate or time.