Chapter 7: RampAController

In Chapter 6: Exchange Rate Providers, we saw how the SelfPeggingAsset (SPA) Pool gets external price information to keep its calculations fair. Remember back in Chapter 1 we also mentioned a parameter called A (Amplification)? This parameter is very important for pools dealing with assets that should trade closely, like two different stablecoins. A higher A makes the pool act more like a 1:1 exchange when trades are small and the pool is balanced, reducing slippage.

But what happens if the pool administrators decide they need to change this A value?

What Problem Does RampAController Solve?

Imagine the ‘A’ parameter is like a big, important dial controlling how sensitive the pool’s pricing is. Maybe the pool needs to become more sensitive (lower A) or less sensitive (higher A) due to changing market conditions or to optimize performance.

If you just instantly flipped this ‘A’ dial to a new setting, it could be very disruptive:

We need a way to turn this dial slowly and predictably, giving everyone time to adjust. This is exactly what the RampAController is designed for.

What is a RampAController?

The RampAController is a dedicated smart contract that manages the gradual adjustment, or “ramping,” of the A parameter for a specific SPA Pool.

Think of it like a programmable motor attached to that important ‘A’ dial:

This ensures the change is smooth, transparent, and happens over a defined period, preventing the problems of an instant switch.

How Do I Use It? (Admin Perspective)

Changing the ‘A’ parameter is usually an administrative task performed by the owner or governor of the SPA. Regular users don’t typically interact with the RampAController directly, but they benefit from the smooth transitions it enables.

Use Case: Gradually increase ‘A’ from 100 to 200 over the next 3 days.

1. Starting the Ramp: