Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[review] MIP-84: Lock-Mint Native Bridge: Basics of Relayer trust assumptions #84

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

apenzk
Copy link
Contributor

@apenzk apenzk commented Jan 8, 2025

Summary

MIP-84

@apenzk apenzk changed the title [draft] MIP-x: Lock-Mint Native Bridge: Rate Limiting Basics [draft] MIP-84: Lock-Mint Native Bridge: Basics of Relayer trust assumptions Jan 8, 2025
@apenzk apenzk requested a review from franck44 January 8, 2025 16:24
@franck44 franck44 added bridge Draft MD/MIP A new/draft MD/MIP labels Jan 8, 2025
We define the following terms:

- **Trusted** : A component is trusted if it is assumed to be secure and reliable. No errors in the component can occur. Nor keys can get compromised.
- **Partially trusted** : A component is partially trusted if it is assumed that under normal operations it is secure and reliable. However, errors may occur due to bugs, misconfigurations, or other reasons. Furthermore, the question is raised if the software component is secure. Protective measures should be taken to reduce the maximally caused damage that the component can cause incase it becomes malicious or faulty.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for partially trusted, I would use: a component is partially trusted if it can unintentional bugs, misconfigurations.

Copy link
Contributor Author

@apenzk apenzk Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added. but do you think we should remove the byzantine behaviour altogether? and if so why?

Copy link
Contributor Author

@apenzk apenzk Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@franck44 i changed the language in the document to

  • trusted
  • untrusted
    • insurance-based untrusted
    • approval/proof-based untrusted

is this better?


- **Trusted** : A component is trusted if it is assumed to be secure and reliable. No errors in the component can occur. Nor keys can get compromised.
- **Partially trusted** : A component is partially trusted if it is assumed that under normal operations it is secure and reliable. However, errors may occur due to bugs, misconfigurations, or other reasons. Furthermore, the question is raised if the software component is secure. Protective measures should be taken to reduce the maximally caused damage that the component can cause incase it becomes malicious or faulty.
- **Untrusted** : A component is untrusted if it is assumed that it is not secure and reliable. Any action should be approved by a trusted party and require a proof of correctness.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A component is untrusted if it can be malicious (Byzantine). Tge component can stop/crash or tamper with messages, results of computations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added


_The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174._

We define the following terms:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you think about it, there is not much difference between partially trusted and untrusted.
Any behaviour an untrusted relayer can exhinit can be simulated by a partially trusted relayer with a corresponding "bug".
In DS, we usually don't distinguish between intentional and unintentional erroneous components because the visible behaviours are the same.

Copy link
Contributor Author

@apenzk apenzk Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the response is different. For an untrusted component I assumed the following

Any action should be approved by a trusted party and require a proof of correctness.

Section "Untrusted Relayer":

  • in case of ZK we require a ZK proof before applying
  • in case of optimistic we wait for 7 days before applying
  • in case of FFS we require a committee signature

This does not hold true for the partially trusted Relayer. There we apply the transaction without any way of reverting and rather soon. If the Relayer becomes faulty/malicious the protocol owner compensates the supply.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I see. However I am not sure we should make a difference between faulty (bug) or compromised (taken control of) when wee compensate users.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is correct. i fixed this in the untrusted case now


**Assumption**: The relayer is fully trusted to submit the completion of the transfer to the bridge contracts.

**Risks**: Since the component is trusted, in principle no risks are associated with it. The risk lies in the trust assumption. If the Relayer software component becomes malicious or faulty, the bridge is compromised, potentially leading to significant loss of funds bounds.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove:
The risk lies in the trust assumption. If the Relayer software component becomes malicious or faulty, the bridge is compromised, potentially leading to significant loss of funds bounds.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

**Risks**: Since the component is trusted, in principle no risks are associated with it. The risk lies in the trust assumption. If the Relayer software component becomes malicious or faulty, the bridge is compromised, potentially leading to significant loss of funds bounds.

**Consequence**:
The relayer can submit the completion of the transfer to the bridge contracts without any restrictions. Since the relayer is trusted, no additional components are needed. Furthermore, no additional protective measures are needed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The relayer always submits the correct completion transaction, i.e. without tampering with the sender, receiver and amount.

Copy link
Contributor Author

@apenzk apenzk Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modified towards this

@apenzk apenzk requested a review from franck44 January 9, 2025 19:38
@franck44 franck44 added the MIP Contains an MIP label Jan 13, 2025
@apenzk apenzk requested review from 0xmovses and Primata January 16, 2025 17:59
@apenzk apenzk changed the title [draft] MIP-84: Lock-Mint Native Bridge: Basics of Relayer trust assumptions [review] MIP-84: Lock-Mint Native Bridge: Basics of Relayer trust assumptions Jan 16, 2025
@apenzk apenzk requested a review from l-monninger January 16, 2025 18:01
@apenzk apenzk added Ready to Review Needs reviewing and removed Draft MD/MIP A new/draft MD/MIP labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bridge MIP Contains an MIP Ready to Review Needs reviewing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants