Content
@
https://opensea.io/collection/dev-21
0 reply
0 recast
2 reactions
Greg
@greg
is there any reference implementation of a smart contract that checks multiple dex's for the best price onchain, or is hardcoding uniswap's universal router the best approach? are there similar routers for other dex's? cc @dcposch.eth im guessing you guys explored this for daimo
4 replies
2 recasts
14 reactions
✳️ dcposch
@dcposch.eth
You can use Uniswap TWAP/TWAL. Unfortunately these are averages: median would be better and more resistant to manipulation. TWAP/TWAL does have the advantage that only uses previous-block pricing = it's resistant to within-block/within-tx manimuplation
1 reply
0 recast
0 reaction
Greg
@greg
interesting, thanks. is this your latest version working in prod? https://github.com/daimo-eth/daimo/blob/master/packages/contract/src/DaimoUSDCSwapper.sol any chance you can share the deployed address?
1 reply
0 recast
0 reaction