Transfer/Send with proxy

I know this is a known issue. I am using UUPS proxies.

If some other contract sends funds with .send to my proxy contract, it's gonna fail, due to 2300 gas not enough. Since sload got costly, delegatecall is costly and so on.

I read OpenZeppelin upgradeable contracts affected by Istanbul hardfork

Now, the question is have Openzeppelin Team somehow come up with the solution ? maybe in 2021 ?

One way I can think of this , is in the proxy, where the delegatecall is, I'd check if calldata size is 0 and if callvalue is more than 0, and in that case, I'd not do the delegate call at all. This might work, but I would need to overwrite openzeppelin's delegate function in the proxy, which i really don't want to do.

What would you advise here ? @frangio

There is no solution other than using a custom proxy as you suggest. Generally .send should be avoided and I don't think it's serious nowadays if your contract doesn't support it.

A post was split to a new topic: X2Y2 and WETH transfer