0

I am trying to review a integration code. The protocol integrate with ZeroEx, and use the code like

address(ZeroExSwapTarget).call(tradeCallData) 

the zeroExSwapTarget is https://etherscan.io/address/0xdef1c0ded9bec7f1a1670819833240f027b25eff#tokentxns

I wonder how the proxy handles the ERC20 trade because looks like all the method is NFT related.

enter image description here

also it is safe to let user generate the trade call data, can they create fake order and steal fund? does ZeroEx has composability with 1inch proxy? Can ZeroEx order includes a 1inch trade?

1 Answer 1

0

0x smartcontracts "implements a delegate-call proxy pattern to create a system of composable smart contracts" as you can check here on the documentation: https://protocol.0x.org/en/latest/architecture/overview.html Additionally you can check here the interface that is used by ZRX proxy to inspect the functionality that is inside it: https://github.com/0xProject/protocol/blob/development/contracts/zero-ex/contracts/src/IZeroEx.sol

To my knowledge, 0x not implemented 1inch trades on 0x Proxy, but could be done if anyone does a bridge for it.You can see examples of bridges here: https://github.com/0xProject/protocol/tree/development/contracts/zero-ex/contracts/src/transformers/bridges

"also it is safe to let user generate the trade call data, can they create fake order and steal fund?"

Users needs to sign a message with his wallet to allow 0x to trade on their behalf and additionally give allowance to 0x proxy contract, so only if user signed a trade he can trade using it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.