You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Currently, the contract requires either the owner's signature or approval from all lockers to authorize a withdrawal. This needs to be changed to support M-of-N approval, where a subset of lockers (e.g., 2 out of 3 or 3 out of 5) can authorize withdrawals without requiring unanimous consent.
Acceptance Criteria
✅ Allow withdrawals if at least M out of N lockers approve.
✅ Keep existing functionality where the owner’s signature alone can approve.
✅ Ensure security: Attackers should not be able to bypass the required quorum.
Proposed Solution
Introduce a threshold (M) parameter when opening a safe.
Modify _validateOpenData to check if M out of N lockers have signed.
Use an efficient counting mechanism to verify M valid approvals.
Example Cases
3 out of 5 lockers approve → Withdrawal allowed ✅
2 out of 5 lockers approve → Withdrawal denied ❌ (if M=3)
Owner signs → Withdrawal allowed (no lockers needed) ✅
No owner, but all M required lockers approve → Withdrawal allowed ✅
The text was updated successfully, but these errors were encountered:
Description
Currently, the contract requires either the owner's signature or approval from all lockers to authorize a withdrawal. This needs to be changed to support M-of-N approval, where a subset of lockers (e.g., 2 out of 3 or 3 out of 5) can authorize withdrawals without requiring unanimous consent.
Acceptance Criteria
✅ Allow withdrawals if at least M out of N lockers approve.
✅ Keep existing functionality where the owner’s signature alone can approve.
✅ Ensure security: Attackers should not be able to bypass the required quorum.
Proposed Solution
Introduce a threshold (M) parameter when opening a safe.
Modify _validateOpenData to check if M out of N lockers have signed.
Use an efficient counting mechanism to verify M valid approvals.
Example Cases
3 out of 5 lockers approve → Withdrawal allowed ✅
2 out of 5 lockers approve → Withdrawal denied ❌ (if M=3)
Owner signs → Withdrawal allowed (no lockers needed) ✅
No owner, but all M required lockers approve → Withdrawal allowed ✅
The text was updated successfully, but these errors were encountered: