merkle
Search
K

Delegated swaps

Merkle RFQ is built with account abstraction in mind. The settler contract has a feature to allow any address to authorize a EOA to swap on their behalf. This allows automated trading systems to trade on behalf of their users and not have to store their private keys.

Authorizing a swapper

In order to authorize a swapper, an EOA needs to call the setApprovalForAll method on the settler contract.
function setApprovalForAll(address _swapper, bool isApproved) public

Example

Bob owns an Ethereum address with a few tokens but want Alice to swap on his behalf. Bob would call the setApprovalForAll for Alice's address. Now, Alice can create orders where the maker is Bob, and sign using her Ethereum address.