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

Feature request: recipient field for swaps #76

Open
secretshardul opened this issue Apr 22, 2022 · 0 comments
Open

Feature request: recipient field for swaps #76

secretshardul opened this issue Apr 22, 2022 · 0 comments

Comments

@secretshardul
Copy link

Uniswap has a to field allowing the output tokens to be sent to an address other than the signer.

https://github.com/Uniswap/v2-core/blob/4dd59067c76dea4a0e8e4bfdda41877a6b16dedc/contracts/UniswapV2Pair.sol#L159

function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data)

Ref should implement this. Suppose we have a proxy contract for swaps-

  1. In EVM, we can set the the to field as the signer's address. This way the tokens directly go to the user.
  2. With Ref, the proxy contract will get the output tokens. Sending the tokens to the user will require another transfer. This more more code and higher gas fee.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant