X2Y2 and WETH transfer

Seems X2Y2 contract is worked by weth.transfer.
I don't know that ethereum mainnet unapplicable the issue.

could you explain it. I can't change weth contract and also want found some solution.

here is x2y2 contract code
x2y2 contract
and one of the successful tx
tx link

Hi, welcome to the community! :wave:

Sorry, I did not find the code like you said above: weth.transfer. I only found weth.deposit and weth.withdraw

hi @Skyge, my bad, i mean's there is payable.transfer in weth.withdraw.

Yeah, you know, cause Istanbul hard fork contains EIP 1884, it will increases the gas cost of the SLOAD, so transfer is not recommended any more, cause when a contract receive ETH by transfer, and do something else, it will revert due to not enough gas, but when you use transfer to transfer ETH to wallet, it is ok, cause wallet only receive ETH and will not do anything else.

And there is an article maybe you can have a look: Stop Using Solidity's transfer() Now | ConsenSys Diligence

I know, i've read all the relevant articles, So the question is weth.withdraw transfer ETH to x2y2 Exchange contract ant it's successful. That is my confuse why the x2y2 can use weth.withdraw ETH to the contract and i failed, here is the test contract i deployed on BSC testnet,
you can get a failed tx info from link

The implementation contract is not verified, so I am not sure what is the logic in your contract.

@Skyge It's the same contract as x2y2