Uniswap / v1-contracts

🐍Uniswap V1 smart contracts
GNU General Public License v3.0
495 stars 318 forks source link

End to End encryption of Uniswap to prevent front running #45

Closed jwineman closed 4 years ago

jwineman commented 4 years ago

Have you thought about implementing the PGP encryption architecture described here:

https://medium.com/fluidity/keyspace-end-to-end-encryption-using-ethereum-and-ipfs-87b04b18156b

This would prevent front running uniswap orders wouldn't it?

evan-forbes commented 4 years ago

one would need homomorphic encryption to compute contract logic privately, otherwise all encrypted messages would eventually have to be unencrypted to be computed. If the transactions are unencrypted before computation, then front running can always be a thing.

https://link.medium.com/N6pFavtL32

wjmelements commented 4 years ago

front-running is a feature and not a bug. If you don't want to be front-run, use the minimum output parameter.

jwineman commented 4 years ago

Yeah I posted this when I was still pretty new to uniswap, I misunderstood what was going on under the hood.