Skip to content

Feature request: recipient field for swaps #76

@secretshardul

Description

@secretshardul

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions