Accountant
The Accountant is used by the Teller to price BoringVault shares. The accountant will have an exchange rate periodically written to it. The exchange rate is calculated off-chain and submitted on-chain. The Accountant restricts how much the exchange rate can change between updates
Updating Exchange Rate
An account with the UPDATE_EXCHANGE_RATE_ROLE can call updateExchangeRate
on the accountant to update the exchange rate. Several security checks are applied during this update.
The contract checks the time since the last update. If not enough time has passed, then the exchange rate is updated, but the accountant is paused.
If the new exchange rate is too large, then the exchange rate is updated, but the accountant is paused.
If the new exchange rate is too small, then the exchange rate is updated, but the accountant is paused.
💡 If the accountant is paused, then getRateSafe()
and getRateInQuoteSafe(ERC20 quote)
will revert.
For the most Boring Vaults, exchange rates will be updated daily with an acceptable range on the order of 10bps with an allowed exchange rate update period of 3-6 hours. .
💡 If market conditions are extremely volatile, for example during asset depegs, it is expected for the exchange rate updater to update the exchange rate, even if it means the accountant will become paused.
Last updated