I'm doing project involving analysis of popular liquidity pools, such as Uniswap and Balancer. For doing that, I need to fetch various data about these pools.
To my understanding, Balancer has a function looking like r1^w1 * r2^w2 * r3^w3 * ... * rn^wn = C. How can I get in Python (using web3 library) values of r (reserves of tokens), w (weights), and also fees that are taken in case of performing swap?
In case of Uniswap I can do it via calling some functions in Uniswap contract. But for Balancer I couldn't find such contract, maybe another method should be used here.