Well this may not be the best way but you can do this in 2 steps instead of doing this in 1 step . Example : Step1 : Seller deposits the ERC20 token to smart contract first. BuyerStep2 : Buyer take ERC20 token from smart contract and in same function buyer will be sending USDC to the seller as well.