Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract contract for exchange native tokens to ERC20 token #292

Open
minghinmatthewlam opened this issue Feb 20, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@minghinmatthewlam
Copy link
Contributor

Context and scope
Teleporter takes in erc20 tokens as fees, but there are apps that interact primarily with the native token of the subnet. We shouldn't require users to hold other erc20 tokens, or need to figure out which tokens to pay relayers with.

Discussion and alternatives
Idea is to create an abstract contract that Teleporter apps can inherit from, and exchanges the native tokens held for a passed in erc20 token. For example WETH's deposit that has a 1:1 exchange. Then the Teleporter app can use the exchanged erc20 token to pay Teleporter fees.

Open questions

  • The abstract contract should be fixed to one erc20 token, likely passed in from constructor
  • How do we check if the erc20 has a deposit function?
  • Does deposit need to be 1:1
  • Should the abstract call Teleporter directly after exchange the tokens?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

1 participant