How does DAI implement interest?

Hi
From my understanding, DAI's peg is (partly) stabilised by the interest rate. But how is the variable interest rate determined and defined? Is it a smart contract on eth? Is it a fixed, hard coded formula?
Thanks
submitted by /u/hoonkai
[link] [comments]