REP-0004 Title: Profile contract - Keep track and allow changes in all relevant addresses of a validator Author: Ronin Core Team Type: Standards Track Status: Approved Created: 2023-06-05
REP-0004 outlines the requirement to implement the Profile contract, which addresses the challenges associated with tracking and modifying the relevant addresses of a validator.
Currently, these addresses are scattered across different contracts, making maintenance difficult and potentially leading to inconsistencies. Additionally, the existing codebase does not allow for changes in these addresses. If a validator requires key rotation, they must renounce their status and reapply, resulting in financial loss since the stake amount from delegators is not automatically transferred upon reapplication. To mitigate these losses and ensure seamless transitions, the Profile contract streamlines the reapplication process, offering a more efficient and secure approach. Furthermore, if private keys are leaked, the Profile contract allows validators to update their addresses. It offers an alternative option alongside the emergency exit protocol, empowering validators to protect their operations and ensuring network integrity is maintained even in challenging circumstances.
CandidateProfile
stores the following information:
id
: the ID of the profile of a validator,consensus
: the concensus address,admin
: the pool admin address,treasury
: the treasury address,governor
: the address to vote proposals.
struct CandidateProfile{
address id;
TConsensus consensus;
address admin;
address payable treasury;
address governor;
}
function addNewProfile(CandidateProfile memory profile)
- The profile must not be existent before.
- Only contract admin can call this method.
function requestChangeConsensusAddr(address id, TConsensus newConsensusAddr)
function requestChangeAdminAddress(address id, address newAdminAddr)
event ProfileAdded(address indexed id)
Event emitted when a profile with id
is added.
event ProfileAddressChanged(address indexed id, RoleAccess indexed addressType)
Event emitted when a address in a profile is changed.
With its comprehensive approach, the Profile contract significantly strengthens the overall reliability and security of the network while providing valuable support to validators in their essential roles.
The content is licensed under CC0.