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 balancer.fiopen in new window

Tips

  • Technical information on rate providers can be found here
  • To submit your own rate provider contract for review, create an issue hereopen in new window

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. If 50% or more of the tokens are yield-bearing, the pool is eligible to be flagged as a core pool to receive a share of fees as voting incentives

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.

What are the steps needed to set up a rate provider with Balancer?

  1. Build a rate provider based on the above mentioned requirements and consult the Balancer RP registry
  2. Make an issueopen in new window against the RP Registry to start the code review process
  3. Wait for the review to finish (takes approx. 1-2 weeks depending on the backlog)
  4. Implement any needed changes that are required to pass the review
  5. Upon merge the rate provider is vetted and a composable stable pool can be set up with the newly implemented rate provider set.

Resources