Receptor Module
The controller's sensor
The Receptor module acts as the sensor of the Controller module by providing the yin's price to Shrine for the Controller to actuate on.
At the moment for CASH, the Receptor relies on Ekubo's oracle extension to read the median time-weighted average price (TWAP) of CASH / {DAI, USDC, USDT}. The TWAP duration is initially set to 3 hours but is expected to be adjusted downwards over time.
Description of key functions
update_yin_price
: fetch the current price of yin and submit it to Shrine. This is intended to be executed via theITask.execute_task()
interface.
Conditions for triggering a yin price update
There are two possible ways in which a price update can be triggered:
sufficient time has elapsed from the last successful attempt to update yin's price; or
the caller has been granted access to call
update_yin_price
, bypassing the requirement in (1).
Option (2) is not used in the current design of the protocol.
Last updated