getRate()function that returns an exchange rate.
rateProviders for all, some, or none of the assets in your pool. If you are not using a rateProvider for an asset, you must pass the zero address (
0x0000000000000000000000000000000000000000), which will result in a rate of 1.
rateProviders for all assets in your pool when each asset has its own price that is independent of all the other assets' prices. If we have tokens A, B, and C and only have price feeds with respect to USD, then we would want all assets to have price feeds. When internally calculating relative prices, the USD would cancel out, giving us prices for A:B, A:C, B:C, and their inverses.
rateProviders for some assets in your pool when you have rates that directly convert between the assets. If we have tokens A and B and a rate provider that gives the price of A with respect to B, then the
rateProvidercorresponding to token A would get the A:B price feed, and the
rateProvidercorresponding to token B would be the zero address.
rateProviders in your pool when your tokens are price-pegged to each other. For example, a pool with
DAIwould have all
rateProviders set to the zero address since the exchange rate between those tokens is 1.
stETH, makes them compatible with Balancer, but knowing the exchange rate between the underlying rebasing token and the wrapped token is necessary to facilitate Stableswap trades. As such, the
getRate()function that calls
stEthPerToken()function. See the contract here.