LlamaSwap / interface

Frontend for LlamaSwap
https://swap.defillama.com
85 stars 77 forks source link

Disallow EthFlow Buy Orders #151

Closed nlordell closed 1 year ago

nlordell commented 1 year ago

This PR adds a check to the CoW Swap adapter to disallow EthFlow buy orders. This is because the contract only allows sell orders:

                // Only sell orders are allowed. In a buy order, any leftover ETH would stay in the ETH flow contract
                // and would need to be sent back to the user, whose extra gas cost is usually not worth it.
                GPv2Order.KIND_SELL, // bytes32 kind

The proposed fix is to throw an error when attempting to quote a buy order from Ether.

vercel[bot] commented 1 year ago

@nlordell is attempting to deploy a commit to the llamapay Team on Vercel.

A member of the Team first needs to authorize it.