pendulum-chain / pendulum-chain/vortex

Add clean up for Polygon ephemeral account

Open
#1,072 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
6
Forks
5
Avg merge
1d 7h
Merged PRs (30d)
33

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Polygon ephemeral-account funding flow and the cleanup worker, focusing on how squidrouter transactions are prepared and executed. Determine a viable way to return native tokens when permit/approve cannot be used, then confirm that the cleanup transaction runs automatically and returns the intended funds to the funding account.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.