-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Context
Due to the big overestimation we are doing for the maxFeePerGas and maxPriorityFeePerGas parameters of the squidrouter transactions, the RPC nodes require the ephemeral account to have a lot more of the native token than required. At the moment, we are not returning the native tokens that were sent by the funding account, back to the funding account. This is mostly relevant for the EUR onramp flow as this is the only route that requires a squidrouter transaction from Polygon.
TODO
Add a cleanup transaction for the Polygon ephemeral account and make it automatically execute by the cleanup worker.
Challenges
- Permit/approve doesn't work because it's not an ERC20
- Look into alternative ways to pay gas for this account
Idea: Create a cleanup transaction for specific amount. Maybe have the funding account send so much POL so that the specified amount is reached and the presigned cleanup can properly execute.