Estimate Clipper Prices
1. Get pool data
{
"pool_type": "offchain",
"pools": [
{
"pool": {
"chain_id": 1,
"address": "0x655eDCE464CC797526600a462A8154650EEe4B77",
"num_assets": 4,
"k": 0.06,
"time_in_seconds": 60,
"default_time_in_seconds": 60,
"swaps_enabled": true
},
"assets": [
{
"name": "ETH",
"address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"price_in_usd": 2076.799,
"listing_weight": 79
},
{
"name": "USDC",
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"price_in_usd": 1,
"listing_weight": 188
},
{
"name": "USDT",
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"price_in_usd": 1,
"listing_weight": 305
},
{
"name": "DAI",
"address": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"price_in_usd": 1,
"listing_weight": 250
}
],
"pairs": [
{
"assets": [
"ETH",
"USDC"
],
"fee_in_basis_points": 9
},
{
"assets": [
"ETH",
"USDT"
],
"fee_in_basis_points": 9
},
{
"assets": [
"ETH",
"DAI"
],
"fee_in_basis_points": 8
},
{
"assets": [
"USDC",
"USDT"
],
"fee_in_basis_points": 5
},
{
"assets": [
"USDC",
"DAI"
],
"fee_in_basis_points": 5
},
{
"assets": [
"USDT",
"DAI"
],
"fee_in_basis_points": 5
}
]
}
]
}2. Estimate Clipper Prices using On- and Off- chain Data
Closed Formed Solution
Root Finding
Final Check: Output Value No Larger than Input Value
Last updated
Was this helpful?
