threefoldfoundation / tft

Threefold token
Apache License 2.0
5 stars 1 forks source link

Create service for activating a stellar account on behalf of the user #240

Closed brandonpille closed 1 year ago

brandonpille commented 1 year ago

It is currently possible to activate a stellar account using this activation service. Although it works like a charm this activation service sponsors the 1 XLM needed to activate the account. In the web3 proxy we have the need to create an account on behalf of the user. But this is mostly required for transferring ethereum to tfchain. So instead of using this activation service we could create a new one that will activate the account given that the user provides a stellar address and transfers some ethereum (enought to pay the 1 XLM to activate the account) to this new service.

robvanmieghem commented 1 year ago

The minimum amount of XLM is 1.5 ( base reserve + trustline to TFT), will take 2

DylanVerstraete commented 1 year ago

Ethereum gas prices for smart contract are pretty high so I'm not sure adding another $10+ cost to the user is the right approach here. It also requires another service to be run by Threefold and creates a central point of failure. If this service is down than the flow on the web3proxy would break, which is already the case in the current setup.

DylanVerstraete commented 1 year ago

I'd rather see this as a part of the ethereum bridge. Where if the user withdraws to a stellar address that does not exist, the bridge activates it and takes some TFT from the withdrawn amount as a fee for it.

robvanmieghem commented 1 year ago

I'd rather see this as a part of the ethereum bridge. Where if the user withdraws to a stellar address that does not exist, the bridge activates it and takes some TFT from the withdrawn amount as a fee for it.

Unfortunately it is not that simple, after activation a trustline to the TFT asset needs to be established by the one holding the private key.

robvanmieghem commented 1 year ago

What I would prefer most is skipping the Stellar step for the user by extending the Etherum bridge to withdraw directly to tfchain ( under the hood, the vaulted funds would be transferred from the Etherum to the tfchain vault though)

DylanVerstraete commented 1 year ago

What I would prefer most is skipping the Stellar step for the user by extending the Etherum bridge to withdraw directly to tfchain ( under the hood, the vaulted funds would be transferred from the Etherum to the tfchain vault though)

This is also an option worth exploring

brandonpille commented 1 year ago

So how do we proceed?

DylanVerstraete commented 1 year ago

It seems @robvanmieghem already deployed the implemented service https://github.com/threefoldfoundation/tft/pull/241/commits/d67e5335d7c9f4f78e1120a1d162eaab5aca4b7b so I guess a followup issue will be created ...

robvanmieghem commented 1 year ago

Adding Ethereum to tfchain to the Ethereum bridge will mainly save the user gas in this use case ( once per user if there is no Stellar account yet) but will take quite some development effort.

robvanmieghem commented 1 year ago

and yes, the fewer components, the better

robvanmieghem commented 1 year ago

What I would prefer most is skipping the Stellar step for the user by extending the Etherum bridge to withdraw directly to tfchain ( under the hood, the vaulted funds would be transferred from the Etherum to the tfchain vault though)

This is also an option worth exploring

242