33 Matching Annotations
  1. Jul 2024
    1. Every time you want to update your app, save the source file. When you do that, Streamlit detects if there is a change and asks you whether you want to rerun your app. Choose "Always rerun" at the top-right of your screen to automatically update your app every time you change its source code.

      Save and auto update

  2. Feb 2024
    1. A Creator proposes a transaction; one or more Updaters supplement it; and one or more Signers authenticate it; before a Finalizer completes it; and an Extracter turns it into a transaction for the Bitcoin network. There may also be a Combiner who merges parallel PSBTs from different users.

      flow

  3. Oct 2023
  4. Aug 2023
    1. We expect specific pre-calculated amounts. And we can also check that these amounts were actually transferred to the pool:

      can use forge test -vv to get the error log

    1. e.g. the oldest observation can come after the most recent one in the array

      the latest one goes to the first slot, then the oldest one will come after it.

    2. There’s no guarantee that an observation will be stored for every block because swaps don’t happen in every block. Thus, there will be blocks we don’t know prices at, and such periods of missing observations can be long. Of course, we don’t want to have gaps in the prices reported by the oracle, and this is why we’re using time-weighted average prices (TWAP)

      TWAP

    3. Notice that self is a storage variable, assigning values to its elements will update the array counter and write the values to contract’s storage.

      self

    4. the accumulated price: current tick gets multiplied by the number of the seconds since the last observation and gets added to the last accumulated price.

      tickCumulative = tickCumulative + tick * (delta seconds)

    5. This is the price manipulation mitigation we discussed earlier: Uniswap tracks prices before the first trade in the block and after the last trade in the previous block.

      avoid flash loan

    6. To mitigate such attacks, Uniswap tracks prices at the end of a block, after the last trade of a block. This removes the possibility of in-block price manipulations.

      flash loan attack

  5. Jun 2023
    1. Summarize the meeting notes in a single paragraph. Then write a markdown list of the speakers and each of their key points. Finally, list the next steps or action items suggested by the speakers, if any.

      Meeting notes summarize

    1. gpt-4 also has a larger context window with a maximum size of 8,192 tokens compared to 4,096 tokens for gpt-3.5-turbo

      gpt-4 has 8k tokens than 4k tokens of gpt-3.5-turbo

  6. Sep 2022
  7. Aug 2022