Compound v3 USDC Supply Kink Parameters on Ethereum Mainnet
{"supplyKi...
Supply Kink parameters for USDC pool on Compound v3 on Ethereum Mainnet
Current supply APR for USDC on Aave V3
Total amount of stETH shares issued by Lido post-rebase
Microsoft Corporation Stock Price (MSFT)
517.88927
Real-time stock price of Microsoft Corporation from Pyth Network
Aave v3 STETH Reserve Factor on Ethereum Mainnet
0.35
Reserve Factor for STETH on Aave v3 on Ethereum Mainnet
Aave v3 USDC Interest Rate Strategy Parameters on Ethereum Mainnet
{"optimalU...
Interest Rate Strategy Parameters for USDC on Aave v3 on Ethereum Mainnet
Compound v3 ETH Supply APR on Ethereum Mainnet
1.92670404...
Annual Percentage Rate for ETH on Compound v3 on Ethereum Mainnet
M2 Money Stock. FRED Series ID: M2SL
Seconds elapsed since the previous rebase event
Current variable borrow APR for WETH on Aave V3
Aave v3 USDC Reserve Factor on Ethereum Mainnet
0.1
Reserve Factor for USDC on Aave v3 on Ethereum Mainnet
Aave V3 USDC Pool Reserve Data
{"totalSup...
Pool reserve data for USDC on Aave V3 (totalSupply, totalStableDebt, totalVariableDebt)
Aave Protocol Collection Data IDs
Array of data addresses in the Aave Protocol collection
Aave v3 WETH Reserve Factor on Ethereum Mainnet
0.15
Reserve Factor for WETH on Aave v3 on Ethereum Mainnet
Compound V3 WSTETH Borrow Kink Parameters
{"borrowKi...
Borrow interest rate model parameters for WSTETH pool on Compound V3
Aave v3 CBBTC Supply APR on Ethereum Mainnet
0.00000839...
Annual Percentage Rate for CBBTC on Aave v3 on Ethereum Mainnet
Palantir Technologies Inc. Stock Price (PLTR)
181.55597
Real-time stock price of Palantir Technologies Inc. from Pyth Network
Compound V3 USDS Utilization
87.44
Current utilization rate for USDS pool on Compound V3 (percent)
Compound V3 USDC Borrow APR
0.0300
Current borrow APR for USDC on Compound V3 (percent)
Aave v3 USDT Supply APR on Ethereum Mainnet
0.03073699...
Annual Percentage Rate for USDT on Aave v3 on Ethereum Mainnet
FRED All Employees: Total Nonfarm Payrolls
Nonfarm Payrolls. FRED Series ID: PAYEMS
Amazon.com Inc. stock price from Pyth Network (USD)
Aave V3 WBTC Interest Rate Strategy Parameters
{"optimalU...
Interest rate strategy parameters for WBTC on Aave V3
Aave V3 WETH Interest Rate Strategy Parameters
{"optimalU...
Interest rate strategy parameters for WETH on Aave V3
Nouns DAO Collection Data IDs
Array of data addresses in the Nouns DAO collection
Civilian Unemployment Rate (percent)
NVIDIA Corporation (NVDA)
179.62591
NVIDIA Corporation stock price from Pyth Network (USD)
Compound V3 USDC Supply APR
0.0300
Current supply APR for USDC on Compound V3 (percent)
Compound V3 USDS Borrow Kink Parameters
{"borrowKi...
Borrow interest rate model parameters for USDS pool on Compound V3
Amazon.com Inc. Stock Price (AMZN)
222.10291
Real-time stock price of Amazon.com Inc. from Pyth Network
Microsoft Corporation (MSFT)
478.087000...
Microsoft Corporation stock price from Pyth Network (USD)
FRED Consumer Price Index for All Urban Consumers
CPI for All Urban Consumers: All Items. FRED Series ID: CPIAUCSL
Real-time US Oil spot price from Pyth Network
Ethereum Block Transaction Count
174
Total number of transactions included in this Ethereum block
Compound V3 USDT Utilization
83.14
Current utilization rate for USDT pool on Compound V3 (percent)
Capital One Financial Corporation Stock Price (COF)
217.475600...
Real-time stock price of Capital One Financial Corporation from Pyth Network
Current supply APR for WBTC on Aave V3 (percent)
Aave v3 WEETH Reserve Factor on Ethereum Mainnet
0.45
Reserve Factor for WEETH on Aave v3 on Ethereum Mainnet
Coinbase Global Inc. Stock Price (COIN)
338.74015
Real-time stock price of Coinbase Global Inc. from Pyth Network
ETH Mainnet Base Fee per Gas by Block
101213974
Minimum base fee per gas required by block on Ethereum Mainnet
Aave V3 DAI Reserve Factor
0.2500
Reserve factor for DAI on Aave V3
Aave V3 USDT Interest Rate Strategy Parameters
{"optimalU...
Interest rate strategy parameters for USDT on Aave V3
Aave v3 DAI Interest Rate Strategy Parameters on Ethereum Mainnet
{"optimalU...
Interest Rate Strategy Parameters for DAI on Aave v3 on Ethereum Mainnet
The Walt Disney Company Stock Price (DIS)
114.32241
Real-time stock price of The Walt Disney Company from Pyth Network
Compound V3 ETH Utilization
83.53
Current utilization rate for ETH pool on Compound V3 (percent)
Aave V3 WETH Variable Borrow APR
0.0000
Current variable borrow APR for WETH on Aave V3 (percent)
Compound v3 USDC Borrow Kink Parameters on Ethereum Mainnet
{"borrowKi...
Borrow Kink parameters for USDC pool on Compound v3 on Ethereum Mainnet
Unemployment Rate. FRED Series ID: UNRATE
Total amount of ETH staked in the Lido protocol post-rebase (wei)
Collection Data IDs: Ethereum Network Analytics
["node815b...
Data IDs for Ethereum Network Analytics collection
Aave V3 USDC Reserve Factor
0.1000
Reserve factor for USDC on Aave V3
Current utilization rate for ETH pool on Compound V3
Personal Consumption Expenditures Price Index (index, 2017=100)
Industrial Production Index
101.4279
Industrial Production: Total Index (index, 2017=100)
Aave V3 WBTC Variable Borrow APR
0.0000
Current variable borrow APR for WBTC on Aave V3 (percent)
Collection Data IDs: Compound Protocol Analytics
["node086f...
Data IDs for Compound Protocol Analytics collection
Real-time USD to JPY exchange rate from Pyth Network
NVIDIA Corporation Stock Price (NVDA)
181.166720...
Real-time stock price of NVIDIA Corporation from Pyth Network
Aave v3 CBBTC Pool Reserve Data on Ethereum Mainnet
{"totalSup...
Pool Reserve Data for CBBTC on Aave v3 on Ethereum Mainnet
Aave V3 WBTC Pool Reserve Data
{"totalSup...
Pool reserve data for WBTC on Aave V3 (totalSupply, totalStableDebt, totalVariableDebt)
Maximum gas allowed in this block
Initial Unemployment Claims
216000
Initial Claims for Unemployment Insurance (thousands)
Aave V3 USDC Variable Borrow APR
0.0000
Current variable borrow APR for USDC on Aave V3 (percent)
All Employees: Total Nonfarm (thousands of persons)
Compound v3 WBTC Borrow Kink Parameters on Ethereum Mainnet
{"borrowKi...
Borrow Kink parameters for WBTC pool on Compound v3 on Ethereum Mainnet
Compound V3 USDS Borrow APR
0.0300
Current borrow APR for USDS on Compound V3 (percent)
Lido Shares Minted as Fees
5689644857...
Amount of shares minted as protocol fees during rebase
Aave v3 STETH Pool Reserve Data on Ethereum Mainnet
{"totalSup...
Pool Reserve Data for STETH on Aave v3 on Ethereum Mainnet
Aave v3 WETH Interest Rate Strategy Parameters on Ethereum Mainnet
{"optimalU...
Interest Rate Strategy Parameters for WETH on Aave v3 on Ethereum Mainnet
Compound v3 ETH Borrow APR on Ethereum Mainnet
2.38258854...
Annual Percentage Rate for ETH Borrow on Compound v3 on Ethereum Mainnet
Compound v3 WSTETH Utilization Rate on Ethereum Mainnet
46.2861956...
Utilization Rate for WSTETH pool on Compound v3 on Ethereum Mainnet
Uniswap V2 DAI/USDC Pool Data
{"token0":...
Current reserves and state for DAI/USDC pool
Ethereum Network Collection Data IDs
Array of data addresses in the Ethereum Network collection
Aave v3 STETH Supply APR on Ethereum Mainnet
0.00020316...
Annual Percentage Rate for STETH on Aave v3 on Ethereum Mainnet
Base fee per gas (EIP-1559)
Compound v3 WSTETH Borrow Kink Parameters on Ethereum Mainnet
{"borrowKi...
Borrow Kink parameters for WSTETH pool on Compound v3 on Ethereum Mainnet
Aave v3 USDC Borrow APR on Ethereum Mainnet
0.05490680...
Annual Percentage Rate for USDC on Aave v3 on Ethereum Mainnet
Maximum gas units allowed in this Ethereum block
Palantir Technologies (PLTR)
176.14793
Palantir Technologies Inc. stock price from Pyth Network (USD)
Compound v3 ETH Borrow Kink Parameters on Ethereum Mainnet
{"borrowKi...
Borrow Kink parameters for ETH pool on Compound v3 on Ethereum Mainnet
US Dollar to Japanese Yen exchange rate from Pyth Network (JPY per USD)
Compound v3 USDT Supply APR on Ethereum Mainnet
3.22128820...
Annual Percentage Rate for USDT on Compound v3 on Ethereum Mainnet
Aave v3 USDC Pool Reserve Data on Ethereum Mainnet
{"totalSup...
Pool Reserve Data for USDC on Aave v3 on Ethereum Mainnet
Compound V3 ETH Supply Kink Parameters
{"supplyKi...
Supply interest rate model parameters for ETH pool on Compound V3
Uniswap V2 USDC/USDT Pool Data
{"token0":...
Current reserves and state for USDC/USDT pool
Aave v3 WEETH Supply APR on Ethereum Mainnet
0.00000401...
Annual Percentage Rate for WEETH on Aave v3 on Ethereum Mainnet
Compound V3 USDS Supply Kink Parameters
{"supplyKi...
Supply interest rate model parameters for USDS pool on Compound V3
Compound V3 WBTC Supply APR
0.0000
Current supply APR for WBTC on Compound V3 (percent)
Apple Inc. Stock Price (AAPL)
262.94886
Real-time stock price of Apple Inc. from Pyth Network
Aave V3 DAI Variable Borrow APR
0.0000
Current variable borrow APR for DAI on Aave V3 (percent)
10-Year Treasury Constant Maturity Rate (percent)
Current supply APR for USDT on Aave V3
FRED Initial Claims for Unemployment Insurance
Initial Claims for Unemployment Insurance. FRED Series ID: ICSA
Lido Pre-Rebase Total ETH
8633303381...
Total ETH before rebase event (wei)
Apple Inc. stock price from Pyth Network (USD)
Total gas used by all transactions in this block
Compound v3 WBTC Supply Kink Parameters on Ethereum Mainnet
{"supplyKi...
Supply Kink parameters for WBTC pool on Compound v3 on Ethereum Mainnet
Compound V3 USDC Borrow Kink Parameters
{"borrowKi...
Borrow interest rate model parameters for USDC pool on Compound V3
Aave V3 USDC Interest Rate Strategy Parameters
{"optimalU...
Interest rate strategy parameters for USDC on Aave V3
Compound v3 USDS Supply APR on Ethereum Mainnet
7.06451973...
Annual Percentage Rate for USDS on Compound v3 on Ethereum Mainnet
Aave Supply APR Calculations - dai
0.03143062...
Supply APR for Aave V3 tokens
Compound V3 Borrow APR Calculations - wsteth
0.01000979...
Calculated borrow APR for Compound V3 pools based on utilization and kink parameters
Aave v3 WBTC Borrow APY on Ethereum Mainnet
0.00155510...
Annual Percentage Yield for WBTC on Aave v3 on Ethereum Mainnet
Compound V3 Supply APY Calculations - usdt
0.03038281...
Supply APY (with compounding) for Compound V3 pools
Aave v3 CBBTC Borrow Utilization on Ethereum Mainnet
0.01832207...
Utilization for CBBTC borrows on Aave v3 on Ethereum Mainnet
Uniswap V2 ETH/USDT 1 ETH→USDT Output
3025.08411...
Output amount for swapping 1 ETH to USDT
Uniswap V2 1-Unit Swap Examples - dai_usdc
{"token0_t...
Swap outputs and price impacts for 1-unit swaps in both directions
Uniswap V2 ETH/USDT 1 ETH→USDT Impact
0.33335529...
Price impact for swapping 1 ETH to USDT
Collection: Compound Protocol Analytics
{"id":"com...
Collection for Compound Protocol Analytics
Aave v3 STETH Supply APR on Ethereum Mainnet
0.00020316...
Annual Percentage Rate for STETH on Aave v3 on Ethereum Mainnet
Aave v3 USDC Borrow APY on Ethereum Mainnet
0.05644383...
Annual Percentage Yield for USDC on Aave v3 on Ethereum Mainnet
Compound V3 Borrow APY Calculations - wbtc
0.01005016...
Borrow APY (with compounding) for Compound V3 pools
Calculated Compound v3 USDT Borrow APR
3.98558176...
Calculated USDT Borrow APR based on utilization and borrow parameters
USDC/USDT USDC/USDT Price
1.00230732...
Current price of USDT per USDC
Lowest Cost Borrow APR Pool
{"pool":"A...
Returns the name and APR of the lowest cost borrow APR pool
Aave v3 STETH Borrow APR on Ethereum Mainnet
0.00197660...
Annual Percentage Rate for STETH on Aave v3 on Ethereum Mainnet
Uniswap V2 1-Unit Swap Examples - eth_usdt
{"token0_t...
Swap outputs and price impacts for 1-unit swaps in both directions
Compound V3 Borrow APY Calculations - eth
0.02321245...
Borrow APY (with compounding) for Compound V3 pools
Metadata and data IDs for the Aave Protocol collection
Calculated Compound v3 USDS Supply APR
7.06451973...
Calculated USDS Supply APR based on utilization and supply parameters
Aave Borrow APY Calculations - usdt
0.04504573...
Borrow APY (with compounding) for Aave V3 tokens
Calculated Compound v3 ETH Supply APR
1.92670404...
Calculated ETH Supply APR based on utilization and supply parameters
Aave Borrow APR Calculations - wbtc
0.00416235...
Variable borrow APR for Aave V3 tokens
Aave v3 WETH Supply APR on Ethereum Mainnet
0.01927276...
Annual Percentage Rate for WETH on Aave v3 on Ethereum Mainnet
Aave Utilization Calculations - weth
0.70041132...
Borrow utilization for Aave V3 tokens
Uniswap V2 ETH/USDC 1 USDC→ETH Impact
0.30000900...
Price impact for swapping 1 USDC to ETH
Aave v3 WEETH Borrow APR on Ethereum Mainnet
0.01016732...
Annual Percentage Rate for WEETH on Aave v3 on Ethereum Mainnet
Calculated Compound v3 USDC Borrow APR
4.86101856...
Calculated USDC Borrow APR based on utilization and borrow parameters
Aave v3 WEETH Borrow APY on Ethereum Mainnet
0.01021918...
Annual Percentage Yield for WEETH on Aave v3 on Ethereum Mainnet
Highest Yielding Supply APR Pool
{"pool":"C...
Returns the name and APR of the highest yielding supply APR pool
Last Seven Settled Nouns Auction Values
An array of the ETH values of the last seven settled Nouns auctions
Uniswap V2 WBTC/ETH 1 ETH→WBTC Output
0.03312647
Output amount for swapping 1 ETH to WBTC
Compound V3 Supply APY Calculations - usdc
0.03231350...
Supply APY (with compounding) for Compound V3 pools
Calculated Compound v3 WBTC Supply APR
5.72946048...
Calculated WBTC Supply APR based on utilization and supply parameters
Aave Supply APR Calculations - wbtc
6.91930811...
Supply APR for Aave V3 tokens
Uniswap V2 Spot Prices - eth_dai
{"token0_t...
Spot prices for both directions in Uniswap V2 pools
Aave v3 USDC Borrow APR on Ethereum Mainnet
0.05490839...
Annual Percentage Rate for USDC on Aave v3 on Ethereum Mainnet
Aave v3 DAI Borrow APR on Ethereum Mainnet
0.05697139...
Annual Percentage Rate for DAI on Aave v3 on Ethereum Mainnet
Uniswap V2 WBTC/ETH 1 WBTC→ETH Impact
1.65920446...
Price impact for swapping 1 WBTC to ETH
Metadata and data IDs for the Compound Protocol collection
Compound V3 Supply APR Calculations - usdt
0.02993039...
Calculated supply APR for Compound V3 pools based on utilization and kink parameters
Aave v3 USDC Supply APY on Ethereum Mainnet
0.03915262...
Annual Percentage Yield for USDC on Aave v3 on Ethereum Mainnet
Calculated Compound v3 USDT Supply APR
3.22128820...
Calculated USDT Supply APR based on utilization and supply parameters
Aave v3 USDC Supply APR on Ethereum Mainnet
0.03840559...
Annual Percentage Rate for USDC on Aave v3 on Ethereum Mainnet
Uniswap V2 WBTC/ETH 0.1 ETH→WBTC Output
0.00331401
Output amount for swapping 0.1 ETH to WBTC
Average of Last Seven Nouns Auctions
Average ETH value of the last 7 settled auctions
Aave Borrow APR Calculations - usdt
0.04406064...
Variable borrow APR for Aave V3 tokens
Aave v3 WEETH Supply APR on Ethereum Mainnet
4.01005466...
Annual Percentage Rate for WEETH on Aave v3 on Ethereum Mainnet
Aave v3 WBTC Borrow APR on Ethereum Mainnet
0.00155389...
Annual Percentage Rate for WBTC on Aave v3 on Ethereum Mainnet
Aave v3 CBBTC Supply APY on Ethereum Mainnet
8.39591113...
Annual Percentage Yield for CBBTC on Aave v3 on Ethereum Mainnet
Current price of ETH per USDC
Compound V3 Borrow APR Calculations - usdc
0.03953908...
Calculated borrow APR for Compound V3 pools based on utilization and kink parameters
Current price of WBTC per ETH
ETH Mainnet 100 Block Rolling Average Base Fee per Gas
641192151
Rolling average of the base fee per gas of the last 100 blocks on Ethereum Mainnet
Aave Supply APR Calculations - weth
0.01178448...
Supply APR for Aave V3 tokens
Current price of USDT per ETH
Current price of ETH per USDT
Aave Borrow APY Calculations - dai
0.05132719...
Borrow APY (with compounding) for Aave V3 tokens
Uniswap V2 ETH/USDC 1 ETH→USDC Output
3026.79324...
Output amount for swapping 1 ETH to USDC
Uniswap V2 DAI/USDC 1000 USDC→DAI Impact
0.48182584...
Price impact for swapping 1000 USDC to DAI
Aave Supply APY Calculations - weth
0.01185420...
Supply APY (with compounding) for Aave V3 tokens
Uniswap V2 WBTC/ETH 1 ETH→WBTC Impact
0.34579914...
Price impact for swapping 1 ETH to WBTC
Aave v3 STETH Borrow APY on Ethereum Mainnet
0.00197855...
Annual Percentage Yield for STETH on Aave v3 on Ethereum Mainnet
Compound V3 Borrow APR Calculations - eth
0.02294714...
Calculated borrow APR for Compound V3 pools based on utilization and kink parameters
Aave v3 WEETH Borrow Utilization on Ethereum Mainnet
0.00071710...
Utilization for WEETH borrows on Aave v3 on Ethereum Mainnet
Uniswap V2 Spot Prices - dai_usdc
{"token0_t...
Spot prices for both directions in Uniswap V2 pools
Uniswap V2 1-Unit Swap Examples - wbtc_eth
{"token0_t...
Swap outputs and price impacts for 1-unit swaps in both directions
Uniswap V2 ETH/DAI 1 ETH→DAI Output
3027.18401...
Output amount for swapping 1 ETH to DAI
Metadata and data IDs for the Nouns DAO collection
Uniswap V2 USDC/USDT 100000 USDT→USDC Output
94138.8397...
Output amount for swapping 100000 USDT to USDC
Aave v3 STETH Borrow Utilization on Ethereum Mainnet
0.15812813...
Utilization for STETH borrows on Aave v3 on Ethereum Mainnet
Aave v3 DAI Supply APY on Ethereum Mainnet
0.03505522...
Annual Percentage Yield for DAI on Aave v3 on Ethereum Mainnet
Aave Borrow APR Calculations - weth
0.01979423...
Variable borrow APR for Aave V3 tokens
Compound V3 Supply APR Calculations - wbtc
0.0
Calculated supply APR for Compound V3 pools based on utilization and kink parameters
Returns the pool with the lowest borrow APR across Aave and Compound
Aave Utilization Calculations - usdc
0.79192982...
Borrow utilization for Aave V3 tokens
Aave Supply APY Calculations - usdt
0.02965726...
Supply APY (with compounding) for Aave V3 tokens
Uniswap V2 USDC/USDT 1000 USDC→USDT Impact
0.35656431...
Price impact for swapping 1000 USDC to USDT
Aave v3 DAI Borrow APY on Ethereum Mainnet
0.05862552...
Annual Percentage Yield for DAI on Aave v3 on Ethereum Mainnet
Uniswap V2 USDC/USDT 100000 USDC→USDT Impact
5.65561894...
Price impact for swapping 100000 USDC to USDT
ETH 5-Block Rolling Average Base Fee
37596889
Average base fee per gas over the last 5 blocks
Average of Last Seven Settled Nouns Auction Values
The average ETH value of the last seven settled Nouns auctions
Compound V3 Supply APY Calculations - wsteth
8.40291359...
Supply APY (with compounding) for Compound V3 pools
Aave v3 WBTC Supply APR on Ethereum Mainnet
2.41458470...
Annual Percentage Rate for WBTC on Aave v3 on Ethereum Mainnet
Aave v3 USDT Supply APR on Ethereum Mainnet
0.03073869...
Annual Percentage Rate for USDT on Aave v3 on Ethereum Mainnet
Calculated Compound v3 WSTETH Supply APR
5.55434343...
Calculated WSTETH Supply APR based on utilization and supply parameters
Calculated Compound v3 USDS Borrow APR
8.30798966...
Calculated USDS Borrow APR based on utilization and borrow parameters
Uniswap V2 ETH/USDT 10 USDT→ETH Impact
0.30010993...
Price impact for swapping 10 USDT to ETH
Ethereum Network Collection
Metadata and data IDs for the Ethereum Network collection
Uniswap V2 DAI/USDC 100000 DAI→USDC Impact
15.6727544...
Price impact for swapping 100000 DAI to USDC
Uniswap V2 1-Unit Swap Examples - eth_usdc
{"token0_t...
Swap outputs and price impacts for 1-unit swaps in both directions
Aave v3 WBTC Borrow Utilization on Ethereum Mainnet
0.03107786...
Utilization for WBTC borrows on Aave v3 on Ethereum Mainnet
Uniswap V2 ETH/USDC 10 ETH→USDC Impact
0.57269013...
Price impact for swapping 10 ETH to USDC
Compound V3 Borrow APR Calculations - usdt
0.03809462...
Calculated borrow APR for Compound V3 pools based on utilization and kink parameters
Collection: Federal Reserve Economic Data
{"id":"fed...
Collection for Federal Reserve Economic Data
Uniswap V2 DAI/USDC 100000 USDC→DAI Impact
15.7018011...
Price impact for swapping 100000 USDC to DAI
Uniswap V2 ETH/USDC 10 USDC→ETH Output
0.00328312...
Output amount for swapping 10 USDC to ETH
Collection: Equities & Financial Markets
{"id":"equ...
Collection for Equities & Financial Markets
Compound V3 Borrow APY Calculations - usdc
0.04033116...
Borrow APY (with compounding) for Compound V3 pools
Uniswap V2 ETH/USDC 10 ETH→USDC Output
30193.4250...
Output amount for swapping 10 ETH to USDC
Compound v3 Supply Rate Calculation
calculate_supply_rate
Calculate the per second supply rate on a Compound v3 pool given the current utilization and pool parameters (supplyKink, supplyPerSecondInterestRateBase, supplyPerSecondInterestRateSlopeLow, and supplyPerSecondInterestRateSlopeHigh)
Converts APR to APY with compounding frequency
Compound V3 Supply Rate Calculation
calculate_supply_rate
Calculate the per-second supply rate on a Compound V3 pool given the current utilization and pool parameters (supplyKink, supplyPerSecondInterestRateBase, supplyPerSecondInterestRateSlopeLow, and supplyPerSecondInterestRateSlopeHigh)
Compound V3 Borrow Rate Calculation
calculate_borrow_rate
Calculate the per-second borrow rate on a Compound V3 pool given the current utilization and pool parameters (borrowKink, borrowPerSecondInterestRateBase, borrowPerSecondInterestRateSlopeLow, and borrowPerSecondInterestRateSlopeHigh)
Aave v3 Interest Rate Strategy Kink Calculation
calculate_kink_apr
Calculate the APR for a given asset on Aave v3 based on the utilization and interest rate strategy parameters in ray
Determines token ordering for Uniswap V2 pools based on token addresses
Uniswap V2 Swap Output Calculation
uniswap_v2_swap_output
Calculate output amount for Uniswap V2 swap with 0.3% fee using constant product formula
Aave v3 Interest Rate Strategy Kink Calculation
calculate_kink_apr
Calculate the APR for a given asset on Aave v3 based on the utilization and interest rate strategy parameters
Compound v3 Borrow Rate Calculation
calculate_borrow_rate
Calculate the per second borrow rate on a Compound v3 pool given the current utilization and pool parameters (borrowKink, borrowPerSecondInterestRateBase, borrowPerSecondInterestRateSlopeLow, and borrowPerSecondInterestRateSlopeHigh)
Determines token ordering for Uniswap V2 pools based on token addresses.
Uniswap V2 orders tokens lexicographically by address (smaller address is token0).
Args:
tokenA: Address of first token (as string, e.g., "0x...")
tokenB: Address of second token (as string, e.g., "0x...")
Returns:
Dictionary with:
- token0: Address of token0 (the token with smaller address)
- token1: Address of token1 (the token with larger address)
Aave v3 Utilization Calculation
# Extract pool reserve data
total_supply = float
Calculate the utilization for a given asset on Aave v3
Uniswap V2 Price Impact Calculation
uniswap_v2_price_impact
Calculate price impact percentage for a Uniswap V2 swap.
Price impact measures the difference between the spot price before the swap and the execution price of the swap.
Args:
amount_in: Amount of input token
amount_out: Amount of output token
reserve_in: Reserve of input token before swap
reserve_out: Reserve of output token before swap
Returns:
Price impact as percentage (e.g., 0.5 for 0.5%)
Uniswap V2 Price Impact Calculation
uniswap_v2_price_impact
Calculate price impact percentage for a Uniswap V2 swap
Uniswap V2 Swap Output Calculation
uniswap_v2_swap_output
Calculate output amount for Uniswap V2 swap with 0.3% fee using constant product formula.
Formula: amountOut = (amountIn * 997 * reserveOut) / (reserveIn * 1000 + amountIn * 997)
The 0.3% fee is applied by multiplying the input amount by 997/1000.
Args:
amount_in: Amount of input token (in smallest unit)
reserve_in: Reserve of input token in pool
reserve_out: Reserve of output token in pool
Returns:
Amount of output token (in smallest unit)
Aave v3 Utilization Calculation
def calculate_utilization
Calculate the utilization for a given asset on Aave v3
Send an email notification via the email processor service