did:cow, a proposal for an ID resolution method with most of the convenience of did:plc/did:web and the robustness of a public blockchain
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

capitalization

+9 -9
+9 -9
README.md
··· 28 28 - **did:plc** - Dependency on a centralized sequencer (plc.directory) which can censor updates and/or create malicious reorgs. 29 29 - **did:ethr** - Gas costs for all updates. 30 30 31 - Migration between DIDs is not possible, so your DID:Web identity only lasts as long as your control of your domain does, and your DID:PLC identity only lasts until the centralized DID:PLC starts acting dishonestly. 31 + Migration between DIDs is not possible, so your did:web identity only lasts as long as your control of your domain does, and your did:plc identity only lasts until the centralized did:plc starts acting dishonestly. 32 32 33 33 We propose that users continue to use these methods for day-to-day updates, but wrap them in a blockchain-managed identity to enable migration between them. 34 34 35 35 ### 1.2 Design Goals 36 36 37 37 1. **Decentralized** - No trusted third-party responsible for ultimate resolution. 38 - 2. **Zero-cost creation** - No blockchain transaction should be required to create a DID:COW ID. 38 + 2. **Zero-cost creation** - No blockchain transaction should be required to create a did:cow ID. 39 39 3. **Method agnostic** - Any DID method can be wrapped. 40 40 4. **Transferable** - The controller used for a did:cow ID can be replaced. If using a smart contract as controller, the controller can be retained but access to the controller changed. 41 41 5. **Composable Control** - The controller can be an arbitrary computer program, allowing sophisticted custom logic and compatibility with multisig and decentralized organization tooling such as [Safe](https://docs.safe.global/home/what-is-safe). ··· 57 57 58 58 ### 3 Examples 59 59 60 - ### 3.1 An initial DID:Web ID 60 + ### 3.1 An initial did:web ID 61 61 62 62 ``` 63 63 initial_controller_address = "8BC101ABF5BcF8b6209FaaAD4D761C1ED14999Be" ··· 65 65 66 66 DID = did:cow:8BC101ABF5BcF8b6209FaaAD4D761C1ED14999Be:web:example.com 67 67 ``` 68 - ### 3.2 An initial DID:PLC ID 68 + ### 3.2 An initial did:plc ID 69 69 70 70 ``` 71 71 initial_controller_address = "8BC101ABF5BcF8b6209FaaAD4D761C1ED14999Be" ··· 79 79 State mutations (updates/deactivations) are standard Ethereum calls made from the controller address. The controller can be an Externally Owned Account (controlled by a single cryptographic key) or a smart contract (controlled by multiple keys and/or custom logic). 80 80 81 81 1. A user sends a transaction either from the controller or calling the controller. 82 - 2. The COW registry contract validates: `msg.sender == current_controller`. 82 + 2. The did:cow registry contract validates: `msg.sender == current_controller`. 83 83 3. Either the state is updated or the transaction reverts. 84 84 85 85 ## 6. CRUD Operations ··· 94 94 95 95 1. Call `resolveCow(initial_controller_address, initial_wrapped_did)` against the registry contract. 96 96 97 - The Cow Registry smart contract performs the following steps: 97 + The did:cow registry contract performs the following steps: 98 98 99 99 - If no on-chain record exists, resolve the wrapped DID from the identifier directly. 100 100 - If an on-chain record exists, prepend `did:` to the returned wrapped DID value and resolve that. ··· 147 147 148 148 *Time until finality:* Updates typically take up to 12 seconds to confirm, and longer to finalize. 149 149 150 - *Cost*: A system requiring consensus will typically have capacity limits. Systems aiming for censorship resistance cannot exercise discretion about which transactions are worthwhile, so they typically regulate usage by charging fees. Usage is unpredictable, so costs are also unpredictable: Although Ethereum gas prices are currently low, they may increase if usage grows faster than capacity, and may also be subject to sudden spikes. DID:Cow updates cost 40,000 to 100,000 gas per update depending on DID length and whether the account has already been registered on-chain. This is roughly equivalent to the cost of a transferring a token. 150 + *Cost*: A system requiring consensus will typically have capacity limits. Systems aiming for censorship resistance cannot exercise discretion about which transactions are worthwhile, so they typically regulate usage by charging fees. Usage is unpredictable, so costs are also unpredictable: Although Ethereum gas prices are currently low, they may increase if usage grows faster than capacity, and may also be subject to sudden spikes. did:cow updates cost 40,000 to 100,000 gas per update depending on DID length and whether the account has already been registered on-chain. This is roughly equivalent to the cost of a transferring a token. 151 151 152 - **Why only one chain:** 152 + **Why only one chain:** 153 153 154 - Some identity standards support multiple chains, for example by putting a Chain ID in the identifier. DID:Cow supports only a single chain, to avoid the additional complexity, the longer identifiers, and the requirement for resolvers to handle multiple RPC endpoints. 154 + Some identity standards support multiple chains, for example by putting a Chain ID in the identifier. did:cow supports only a single chain, to avoid the additional complexity, the longer identifiers, and the requirement for resolvers to handle multiple RPC endpoints. 155 155 156 156 ## 8. Privacy Considerations 157 157