I’ve been trying to analyze how the controller behaves and I have an oversimplified scenario where the system seems to be losing money.
Let’s say we have a proportional only controller and lets disregard the stability fee. The price of ETH/USD doesn’t change, but RAI/ETH (or RAI/USD) fluctuates.
-
time = 0, system is in equilibrium
market price: 1 ETH = 100 RAI = $100
minting/burning price: 1 ETH = 100 RAI -
time = 1, there’s too much demand for RAI
market price: 1 ETH = 90 RAI, 1 RAI ~= $1.1
controller reacts by setting minting/burning price: 1 ETH = 110 RAI
new borrower deposits 2.0 ETH and mints 110 RAI matched by 1.0 ETH of his deposit
he sells at market price 110 RAI for ~1.2 ETH
he returns the system to equilibrium and profits 0.2 ETH -
time = 2, there’s too much supply of RAI
market price: 1 ETH = 110 RAI, 1 RAI ~= $0.9
controller reacts by setting minting/burning price: 1 ETH = 90 RAI
same borrower buys from market 90 RAI for ~0.8 ETH
he burns 90 RAI corresponding to 1.0 ETH and removes his 2.0 ETH deposit
he returns the system to equilibrium and profits again 0.2 ETH
So 110 RAI was minted in time=1 and 90 RAI was burned in time=2, now there’s extra 20 RAI floating in the open market, but the total deposited ETH has at time=3 is the same as at time=0.
Am I missing something? I’m still trying to understand the mechanics of this protocol, so please help me undestand if I’m missing something critical.