Dai Savings Rate
Use the 'mcd:savings'
service to work with the Dai Savings Rate system. In the code, this is called SavingsService.
Instance methods
All the methods below are asynchronous. join
, exit
, and exitAll
use a proxy contract.
join(amount)
Deposit the specified amount of Dai into the Dai Savings Rate (DSR) contract.
exit(amount)
Withdraw the specified amount of Dai from the DSR contract.
exitAll()
Withdraw all Dai owned by the current account from the DSR contract.
balance()
Return the amount of Dai in the DSR contract owned by the current address. Strictly speaking, this method returns the amount of Dai owned by the proxy contract for the current address. to work with the methods above.
balanceOf(address)
Return the amount of Dai in the DSR contract owned by the specified address.
getTotalDai()
Get the total amount of Dai in the DSR contract for all users.
getYearlyRate()
Get the current annual savings rate.
Last updated