DFS Registry
All the contract addresses used in the protocol are registered in the DFSRegistry
contract.
Each contract has an unique ID and the same ID cannot be registered twice. A contract address can be fetched by calling getAddr(id)
.
The first time a contract address is registered a waitPeriod
is also set, which represents the number of seconds needed to pass before the contract address can be updated. In order to update the contract address you call startContractChange
and wait for the entry's waitPeriod
before you can call approveContractChange
. This is done so that users have sufficient time to exit the system, or the owners have enough time to react in case of a malicious contract upgrade.
While the contract is in the process of an update, the update can be canceled using cancelContractChange
.
Below is the interface of the contract:
Last updated
Was this helpful?