Rate Providers

Rate providers are contracts that provide an exchange rate between two assets. For example, the rate of stETH to wstETH. If a pool is created with tokens that use unreviewed rate providers, it will not show on bush.fiopen in new window

Tips

  • Technical information on rate providers can be found here

When is a rate provider needed?

The primary use-case of a rate provider is the deployment of liquidity in a composable stable pool consisting of correlated or non-correlated assets containing a yield-bearing asset.

What are the requirements for a rate provider contract?

  • Must implement the IRateProvideropen in new window interface, which simply requires a getRate() function that returns an 18 decimal fixed point number that is the exchange rate of the token to some other underlying token.
  • If the rate provider or any underlying portion of the rate can be upgraded, changed, manipulated in any way it will not be owned by or executed by an EOA. It must be a multisig with a minimum set up of 3/5 signers.
  • Timelock is encouraged but not required.
  • Should not be susceptible to donation attacks.
  • Should be monotonic (up only) in nature.

Warning

It is essential for the rate provider to behave in the expected way at all times. Scenarios where for example an upgrade makes the getRate call revert, swaps through the pool will revert. If the rate provider returns unexpected values the pool can get drained.

Resources