ExchangeRateFeeder
The ExchangeRateFeeder contract is responsible for calculating and determining the exchange rate between an Ethereum stablecoin and their aTerra counterpart.
Events
RateUpdated
RateUpdated
Emitted when exchange rate is updated.
Key | Type | Description |
| address | Address that updated the exchange rate |
| address | Address of token that had its exchange rate updated |
| uint256 | Exchange rate value pre-update |
| uint256 | Exchange rate value post-update |
| uint256 | Number of times that interest was compounded during the update |
State
Status
Status
Represents the exchange rate updatability for a stablecoin.
Key | Description |
| Set when a stablecoin was first added |
| Exchange rate of stablecoin available for updates |
| Set when exchange rate updates for this stablecoin is stopped |
Token
Token
Represents information for an aTerra token.
Key | Type | Description |
| Status | Exchange rate updatability status |
| uint256 | Exchange rate when the exchange rate was last updated. |
| uint256 | Minimum time period required between exchange rate updates |
| uint256 | Interest rate per |
| uint256 | Block timestamp when exchange rate was last updated |
Functions
exchangeRateOf
exchangeRateOf
Gets the exchange rate for the specified aTerra token. Returns a simulated value (reflects yield accrued since last exchange rate update) if _simulate
is set as true
. Returns the last updated exchange rate value is _simulate
is set as false
.
Key | Type | Description |
| address | Address of aTerra token to retrieve exchange rate |
| bool | Indicator on whether to return a interest-accrued value |
update
update
Updates the exchange rate for specified aTerra token.
Key | Type | Description |
| address | Address of aTerra token to update exchange rate |
Last updated