33 Matching Annotations
- Jul 2024
-
apollox-finance.gitbook.io apollox-finance.gitbook.io
-
30 crypto and forex markets
forex is closed
-
Elevate trading with up to 1001x leverage
1001x
-
Offering both order book and on-chain perpetuals
order book
-
-
docs.streamlit.io docs.streamlit.io
-
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
-
-
karpathy.ai karpathy.ai
-
gaussian
高斯的,正态分布
-
derivative
衍生物,导数
-
- Feb 2024
-
github.com github.com
-
especially useful for use cases involving hardware wallets
hardware wallet
-
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
-
- Oct 2023
-
redis.io redis.io
-
The message was successfully claimed by Alice
create a general consumer to process expired messages?
-
- Aug 2023
-
uniswapv3book.com uniswapv3book.com
-
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
-
-
uniswapv3book.com uniswapv3book.com
-
If the next price range doesn’t exist, the trade ends up fulfilled partially-we’ll see how this works later in the boo
partially?
-
-
uniswapv3book.com uniswapv3book.comPrice Oracle10
-
boundaries
Why use
index+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.
-
each point on the line will be a price at a specific timestamp between the two observations.
no observations still can have prices now
-
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
-
the trickiest part
agree
-
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
-
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)
-
This means that if there’s already an observation for the current block, a price is not recorded.
immuted
-
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
-
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
-
- Jun 2023
-
github.com github.com
-
我们在 api 里面也能用插件,想想都美滋滋。
期待
-
-
platform.openai.com platform.openai.com
-
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
-
Tactic: Include details in your query to get more relevant answers
Clear instructions examples
-
-
platform.openai.com platform.openai.com
-
Below is an example function for counting tokens for messages passed to gpt-3.5-turbo-0301.
count tokens
-
-
platform.openai.com platform.openai.com
-
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
-
-
platform.openai.com platform.openai.com
-
Assistant messages store previous assistant responses, but can also be written by a developer to give examples of desired behavior.
Assistant is who answering questions?
-
The user messages provide requests or comments for the assistant to respond to
User is who asking questions?
-
"You are a helpful assistant."
Default system message.
-
The system message helps set the behavior of the assistant.
How to set up a good system message?
-
- Sep 2022
-
gist.github.com gist.github.com
-
把 Caps Lock 變成智慧的 Control 以及 Escape
caps lock to control
-
- Aug 2022
-
www.raycast.com www.raycast.com
-
They all want to build the best product in the shortest time possible.
最短时间做最好的产品
-
-
-
IUniswapV2Pair(pair).swap(amount0Out, amount1Out, address(this), data);
how to use in multiple pairs
-