Can I optimize this so that I sell the token/eth if only the transaction arrives without my participation ?
For example, someone sends me an eth and as soon as the transaction arrives, 1inch / uniswap immediately sell and exchange it for DAI at the current price?
I don't think that they are any official tools or smart contracts for that because that, at least i have never heard of a function like that. I am pretty sure though that bots or scripts for that exist somewhere out there in the depths of the internet but i would definitely not use any of those because it is just way to dangerous. If you want a bot or script that automatically sells tokens or coins as soon as they arrive on your wallet then this bot basically needs full control over your wallet and always needs to be connected to it. This means also means that if you just use a bot from the internet then it is very much possible that the programmer of the bot has now full control over your wallet and can withdraw your coins to his wallet.