-
Notifications
You must be signed in to change notification settings - Fork 8
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
Safe Harbor Agreement Implementation Standard #5
Conversation
Amazing, thanks for putting this together. The structure looks good to me, and one interesting thing I hadn't considered before is your Before merging the PR I'm going to do two things:
Thanks again and will circle back here |
Should have linked to the Agreement — I got this from EXHIBIT F (Adoption Form) where it states “In the event of any conflict or inconsistency between the summary and the text of the Agreement, the text of the Agreement will govern.” Sounded like the text of the Agreement is the source of truth, so I included similar language. Probably good idea to double-check. |
Adjust names of `direct` and `child` assets. Clarify contact information. Generally simplify descriptions.
I was making the website form, and it occurred to me that Updated the PR - if you have any objections let me know. |
RE: The conversion I had with Gabe. Updated the smart contracts to have upgradable agreements & to encode the implementation standard in code. In short, adopting the agreement now requires deploying a smart contract that will record adoption details from a pre-approved contract deployed. Adoption changes
Setup Changes AdoptionDetails Changes struct AgreementDetailsV1 {
// The name of the protocol adopting the agreement.
string protocolName;
// The accounts in scope of the agreement.
Account[] scope;
// The contact details (required for pre-notifying).
Contact[] contactDetails;
// The bounty terms.
BountyTerms bountyTerms;
// Indication whether the agreement should be automatically upgraded to future versions approved by SEAL.
bool automaticallyUpgrade;
// Address where recovered funds should be sent.
address assetRecoveryAddress;
// IPFS hash of the actual agreement document, which confirms all terms.
string agreementURI;
}
struct Account {
// The address of the account (EOA or smart contract).
address accountAddress;
// The chain IDs on which the account is present.
uint[] chainIDs;
// Whether smart contracts deployed by this account are in scope.
bool includeChildContracts;
// Whether smart contracts deployed by this account after the agreement is adopted are in scope.
bool includeNewChildContracts;
}
struct Contact {
// The name of the contact.
string name;
// The role of the contact.
string role;
// The contact details (IE email, phone, telegram).
string contact;
}
enum IdentityRequirement {
Anonymous,
Pseudonymous,
Named
}
struct BountyTerms {
// Percentage of the recovered funds a Whitehat receives as their bounty (0-100).
uint bountyPercentage;
// The maximum bounty in USD.
uint bountyCapUSD;
// Indicates if the Whitehat can retain their bounty.
bool retainable;
// Identity requirements for Whitehats eligible under the agreement.
IdentityRequirement identityRequirement;
// Description of what KYC, sanctions, diligence, or other verification will be performed on Whitehats to determine their eligibility to receive the bounty.
string diligenceRequirements;
} |
Hash now ignores the signature var.
Signatures should be performed on encoded data, not on the raw hash. Added a new `encode` function that encodes a `AgreementDetails` and returns the hashed value. Updated all tests and `GenerateAccountSignatureV1` ``` encode(domainSeparator : 𝔹²⁵⁶, message : 𝕊) = "\x19\x01" ‖ domainSeparator ‖ hashStruct(message) ```
…cripts and tests.
Enums aren't really specified, so I don't want to deal with them.
EDIT: 2024-06-23
Marking this PR as functionally complete. Changes to form may be performed, but avoid making functional changes barring catastrophe.
Original Message
Following up with Discussion #4, I created this document as a V1 of the Safe Harbor Agreement Implementation Standard. It outlines a standardization for the contents of
AgreementDetails
, ensuring consistency and compliance across all agreements. Standardization of these contents will help Whitehats understand the contents of the Agreement more easily in potentially time-sensitive environments, and will help software parse and display multiple agreements in a standardized manner.It outlines specific standards in JSON format for the
scope
,contactDetails
andbountyTerms
fields of theAgreementDetails
struct, providing structured information regardingstatic assets
,implicit assets
,primary
andsecondary contacts
,identity requirements
,diligence requirements
,bounty percentage
,cap
, andretainability
; and sections foradditional information
where necessary.