pendulum-chain / vortex

1 stars 0 forks source link

Single click transaction automation #43

Closed prayagd closed 2 months ago

prayagd commented 3 months ago

Context

For the polygon prototype - Bridge + XCM + Swap + Redeem + offramp all operations should happen on a single transaction signing that would be done on the Polygon network.

prayagd commented 3 months ago

@TorstenStueber @gianfra-t @ebma please fill in the technical details

ebma commented 3 months ago

I think filling in the technical details is not really possible before we have the results of #40 and #42.

vadaynujra commented 3 months ago

@ebma wouldn't the blocker here be the bridge research only? If this is about writing a script on Polygon to automate trxs thereafter, can we not already progress this?

ebma commented 3 months ago

But in order to know how to automate/simplify a process I would need to know what the process looks like. And this I do after #42. To be honest, I think #42 and this ticket should go hand in hand as ideally we already thought about automating the whole flow as much as possible when working on #42.

gianfra-t commented 3 months ago

This ticket would be the placeholder for the logic of the user signing and kicking all the axelar bridge transactions right? If that is the case then yes it is very dependent on #42.

I agree all this tasks should go together and already we see a potential difference to what was expected, it seems to be the case that we can only bridge axlUSDC and not USDC. Which means we need to also add a swap first. It may be that the user has to sign 2 or 3 times on the polygon side.

TorstenStueber commented 3 months ago

I don't think that there is a real place for this ticket here. The "automation" is just the general logic of the prototype and the different bits of automation will happen in different tickets. Let's look at the flow:

The remaining part is possibly the creation of the Pendulum ephemeral account. We did not clearly define whether this is part of this ticket here or of #35 (@gianfra-t how do you treat this?)

TorstenStueber commented 3 months ago

I forgot one thing: we also need to find a way of how to have a one click experience in Polygon. Right now 4 transactions would need to be signed.

I guess that this means that we also need to introduce an ephemeral account on Polygon in the same fashion as for Pendulum and as for Stellar. Likewise, we could also implement a smart contract that does these four actions on behalf of the user.

vadaynujra commented 3 months ago

@TorstenStueber what's the decision criteria to choose between the 2 solutions? Can you share more information on the pros and cons based on security, complexity, cost (per transaction) and / or others?

Alternatively, would a simpler solution (than the 2 above) maybe reduce the signings from 4 to 3 or 2 (instead of one), and maybe we could work with that for the pmf?

gianfra-t commented 3 months ago

@TorstenStueber I am treating #35 mostly as part of this Polygon -> Pendulum phase. That would include creation of ephemeral, function to await for ephemeral to receive tokens.

TorstenStueber commented 3 months ago

@gianfra-t can you elaborate how creation of an ephemeral account on Polygon would be part of #35?

gianfra-t commented 3 months ago

Not of polygon, but of the ephemeral account in Pendulum. Regarding what you where saying here, I was treating #35 as the corresponding ticket to handle that part of the whole flow automation, but so far I haven't made any assumptions as of how this account will be funded. We discussed I think a back-end funding this account similar to the signing service?

TorstenStueber commented 3 months ago

Yes, as I suggested here.

prayagd commented 2 months ago

closing this as i expect this to be completed, feel free to reopen if not.