shotaro (shotaro)

shotaro

somewhere

86 Followers

Recent casts

commit-reveal is a common pattern in smart contracts to avoid front running in oracles. But sometimes even committing is enough signal that people can copy without compensating the oracle provider. I was thinking how to avoid this and the solution seems to split the commit and reveal in separate contracts. Make the commitment in a stealth address (deploy contract as a commitment to a fresh address) and later point to it in a public reveal contract triggering any on-chain actions. https://medium.com/@edmundedgar/the-parasite-and-the-whale-7cb3c87e9902 reminds me of @edmundedgar.eth 's post on the parasite and the whale.

  • 1 reply
  • 0 recasts
  • 2 reactions

can someone explain to why I shouldn't use infinite "slippage" when withdrawing LP? https://github.com/Uniswap/v3-periphery/blob/0682387198a24c7cd63566a2c58398533860a5d1/contracts/NonfungiblePositionManager.sol#L275 uni v3 sdk uses 50 bips https://github.com/Uniswap/examples/blob/733d586070afe2c8cceb35d557a77eac7a19a656/v3-sdk/modifying-position/src/example/Example.tsx#L115C28-L115C47 "slippage" check is useless. "front running" can't hurt LPs withdrawing (as long as current pool price is correct?)

  • 1 reply
  • 1 recast
  • 1 reaction

Top casts

can someone explain to why I shouldn't use infinite "slippage" when withdrawing LP? https://github.com/Uniswap/v3-periphery/blob/0682387198a24c7cd63566a2c58398533860a5d1/contracts/NonfungiblePositionManager.sol#L275 uni v3 sdk uses 50 bips https://github.com/Uniswap/examples/blob/733d586070afe2c8cceb35d557a77eac7a19a656/v3-sdk/modifying-position/src/example/Example.tsx#L115C28-L115C47 "slippage" check is useless. "front running" can't hurt LPs withdrawing (as long as current pool price is correct?)

  • 1 reply
  • 1 recast
  • 1 reaction

commit-reveal is a common pattern in smart contracts to avoid front running in oracles. But sometimes even committing is enough signal that people can copy without compensating the oracle provider. I was thinking how to avoid this and the solution seems to split the commit and reveal in separate contracts. Make the commitment in a stealth address (deploy contract as a commitment to a fresh address) and later point to it in a public reveal contract triggering any on-chain actions. https://medium.com/@edmundedgar/the-parasite-and-the-whale-7cb3c87e9902 reminds me of @edmundedgar.eth 's post on the parasite and the whale.

  • 1 reply
  • 0 recasts
  • 2 reactions

Onchain profile

Ethereum addresses