https://github.com/manifoldfinance/metrics
Dune Analytics / Google BigQuery SQL Queries for OpenMEV/Sushi Relay
https://github.com/manifoldfinance/metrics
dune dune-analytics google-big-query sql
Last synced: 20 days ago
JSON representation
Dune Analytics / Google BigQuery SQL Queries for OpenMEV/Sushi Relay
- Host: GitHub
- URL: https://github.com/manifoldfinance/metrics
- Owner: manifoldfinance
- License: apache-2.0
- Created: 2021-11-19T20:10:42.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-11T17:24:45.000Z (over 3 years ago)
- Last Synced: 2026-01-15T17:03:26.268Z (3 months ago)
- Topics: dune, dune-analytics, google-big-query, sql
- Homepage:
- Size: 34.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# metrics
> Dune Analytics / Google BigQuery SQL Queries for OpenMEV/Sushi Relay
[https://dune.xyz/manifold/Manifold-Finance](https://dune.xyz/manifold/Manifold-Finance)
## Arb Volume
[https://dune.xyz/embeds/17821/36015/52b2257a-31b2-493e-be35-373313c1a39c](https://dune.xyz/embeds/17821/36015/52b2257a-31b2-493e-be35-373313c1a39c)
## Anatomy of a Gas Rebate

### Assumptions
maxPriorityFeePerGas= 2.5 Gwei
> See Appendix 1 for how this is calculated
```js
maxPriorityFeePerGas = BigNumber.from("2500000000");
```
- Miner Bribe = maxPriorityFeePerGas * 1.00175
- Miner Fees: (original transaction gas fee) + **[ Miner Tip (bribe) ]**
- User Eligible Rebate: (original transaction gas fee / 80% Confidence Gas Level )
- Sushi Payouts = **[ Miner Tip (bribe) ]** + **[User Eligible Rebate]**
- Gas Rebate Normalized Total Cost:
- maxPrice
Highest priced transaction in the mempool
- currentBlockNumber
Block number at the time of prediction
- msSinceLastBlock
Milliseconds since the last block was mined relative to when data was computed
- blockNumber
Block this prediction is for
- baseFeePerGas
Base fee per gas for current block in gwei. (Only type2 transactions Post EIP-1559 have this value and it's burned by the network upon transaction success).
- estimatedTransactionCount
Number of items we estimate will be included in next block based on mempool snapshot
- confidence
0-99 likelihood the next block will contain a transaction with a gas price >= to the listed price.
## SushiSwap
```json
{
"contractCall.methodName": [
"swapETHForExactTokens",
"swapExactETHForTokens",
"swapExactETHForTokensSupportingFeeOnTransferTokens",
"swapExactTokensForETH",
"swapExactTokensForETHSupportingFeeOnTransferTokens",
"swapExactTokensForTokens",
"swapExactTokensForTokensSupportingFeeOnTransferTokens",
"swapTokensForExactETH",
"swapTokensForExactTokens"
]
}
```
## Appendix 1
[see hackmd]