Why Ownership Matters
When you deploy a contract, such as an OFT token, the deployer is set as the initial owner. As the owner, you have the ability to configure many administrative settings, including:- Peer Management: Setting peers for crosschain operations.
- Delegate Controls: Managing delegate addresses.
- Enforced Options: Configuring options that govern contract behavior.
- Message Inspectors: Overseeing message processing and security checks.
Recommended Best Practices
-
Retain Ownership with a Secure Multisig:
- Do not renounce ownership of critical contracts like the OFT. Instead, transfer ownership to a multisig wallet.
- A multisig setup requires multiple signatures (or approvals) for administrative actions, reducing the risk of a single point of failure.
- Use a high enough quorum to ensure that no single party can unilaterally change settings.
-
Maintain Flexibility:
- Retaining ownership allows you to adjust peers, delegates, and other settings as your crosschain protocols evolve.
- This flexibility can be critical for adding new networks or responding to chain level disruptions.
-
Document and Audit:
- Clearly document the ownership and administration process for your contracts.
- Regularly audit the multisig wallet and its quorum settings to ensure they meet current security and governance standards.
Example: Transfer of Ownership
LayerZero’s contracts follow theOwnable pattern. For example, here’s how you can transfer ownership of an OFT token contract:
Summary
- Retain Ownership: Do not renounce ownership on critical LayerZero contracts (like the BNB OFT token).
- Use Secure Multisig: Always maintain ownership through a properly configured multisig wallet to allow for necessary administrative controls.
- Stay Flexible: Keeping control allows you to update settings such as peers, delegates, and message inspectors as needed.