Ethereum Attestation Service 🛠️ Building with EAS The base layer for attestations

ETHGlobal Paris 2023 · 31 Jul 2023 · 21:04

Bryce Patrick and Steve Dakh from the Ethereum Attestation Service introduce attestations, signed structured data that can be issued on-chain or off-chain, as a base layer for identity and trust. They explain the schema registry and attestation contracts, optional resolvers, and examples including a social network built from attestations, content authenticity, in-person meeting records and a trust graph. They also cover timestamping off-chain attestations, Merkle-root private data, and how EAS compares with verifiable credentials.

Speakers

Topics

From ETHGlobal Paris 2023, hosted by ETHGlobal.

Transcript

So, my name is Ross. I'm part of the core team of Ethereum Attestation Service. So, my role is around really around like product development, product design. I do some of the front-end dev stuff. And then we also have Steve here. I'll let Steve do his intro. I'm just a CTO Post-Oak Dev for EAS. And so today what we're going to go through is we're going to spend the first like couple minutes just explaining why we built EAS and then the we'll go through some examples that have been built and then we'll really spend a lot actually making some schemas together so you get a better idea of how to start using EAS for the Sac-a-thon.

We'll also give you some inspiration of some ideas that could be hacked with and go from there. We want this to be interactive and I know we're probably won't cover all the questions that you have so we will have be at our booth to interact with you throughout the rest of this weekend. So, how many of you know what attestations are? To start. Nice. Good. It's a newer primitive that is catching a lot of like the narrative today and so we're excited to introduce a little bit more about how we see them. So, attestations are simply just a digital signature of some structured data and that might seem pretty abstract, right? Like, okay, about what? Right? So, we're going to go go into that. What we were noticing in the ecosystem is that there was a lot of

identity protocols being built and while EAS isn't distinctly an identity protocol, what we were recognizing is that there's a lot of projects that were trying to solve digital identity because it can unlock so many new and powerful use cases. And so we're thinking, well with all this fragmentation as devs, we have to learn all these new protocols, right? Just to try to come up with a more comprehensive view of what an identity is. So, each of these entities are creating their own type of attestations, but none of them are really communicating with each other.

And so we're thinking, well, what actually is identity? What was your first identity? And so, we went through that kind of first principles approach. We're thinking, well, when you're born, you didn't have an identity, and then you did. So, what happened? It's when your mom named you, right? She said, "This is my child, Bryce." And then, throughout life, other entities started attesting about different aspects of who you are. The doctor, um, could have attested to your date of birth. The identity uh, your identity card could have been attested to by the government. You go to school, and the teacher attests to your grades. Your employer attests to your job and your skills. And And you start also, uh, attesting to other entities.

You attest to the friends that you like, the food that you like. So, you're not only receiving, but you're also issuing attestations. And so, we realized you can actually represent identity as an aggregate of attestations about someone over time, or an entity over time. And so, if you actually want to solve for digital identity, it's really difficult to start with just a service or protocol that just focuses on that. We first have to start as a base layer where any entity can make attestations about anything. This could be identity-related, or it could be much more. So, that's what we built. We built an open-source infrastructure, public good, for making attestations on chain or off chain.

So, it's completely open source. We have an SDK and a bunch of dev tools to make the process really easy. We realized that if you want to solve for like trust online, and use using these digital signatures for things like identity, or like verifications of any type, it's extremely important that it wasn't monetized at the infrastructure layer, because then one person would have some advantage or try to game the ecosystem, or someone eventually would just fork the protocol, and then just take it to to zero. So, we built it as a public good, so it's it's funded through grants. And uh, the the whole idea is to make money on top of the protocol, not from within.

So, EAS is completely open source, free to use. It runs on two simple smart contracts and we'll get into some examples here, but just understand it at a high level. There's a schema registry contract, which allows you to register any structured data about any topic. So, that structured data could be imagined we're at this hackathon, right? And you wanted to attest to the hackathon location. You might think like, okay, well, what type of data would be important? Maybe it's the hackathon name, maybe it's the hackathon start time. So, you might use like start time uint64. start to create the structure of the data. And then the second contract allows you to make attestations on that.

We also allow you to set an optional resolver. So, if an attestation is made on a particular schema type, you can make it mint an NFT or do any sort of smart contract functionality based off of the attestation being being made uh with that schema. The traction's been pretty great. So, optimism they were building their attestation station um that you might have heard of in the market. They actually deprecated their V0 contracts and upgraded to the EAS standard. So, we're part of like the native uh uh core contracts there.

Um and then so so with that, we're deployed on base. Any of the OP stack chains will have EAS. And we're excited to continue to unite the ecosystem towards a unified attestation layer. So, attestations they go beyond identity. They can be used anywhere trust or verification are needed. And I'm going to be showing you some examples on our EAS Scan Explorer. It's kind of like the EAS Scan for for attestations. Uh sorry, the Etherscan uh for uh attestations.

So, this is if we think about attestations, a social network is simply just a network of attestations, right? So, when you post something on Twitter, that's just an attestation of you making a statement. If someone likes that post, that's also just a like of your post, right? They're attesting that they like that piece of content. If they follow, reply, repost, update, all these interactions are just one entity saying something about uh some other subject or or event. And so we built this sample UI. It's called Speak Eth.

And you can see that there's some posts being Is this Is the screen size good? Yeah. Go a little bit more. You can see that there's these posts being made. Here's one from Tim. He attested GM, and then there's a reply. There's one reply and a like. So if we inspect this attestation, underneath the hood, this is all running on attestations. So if we click on the attestation record, it brings us to the EAS scan, which is like Etherscan. And we can see that Tim attested GM at this time.

And then each attestation record has its own unique identifier, and that can be used to reference things. So if we scroll down, there were two other entities that referenced this UID, that they liked it, and that there was a post. So if we click on the like, it goes to a different attestation record, and it shows uh this person attesting like true, and then referencing that previous attestation UID. So you can start to build very composable networks of statements people are making. And you can do that all off chain, too.

One other use case is around content authenticity. So imagine with all this AI-generated content that's being produced produced, how do we actually know what's being made by the creator is real? So uh if you've seen that these TikTok videos with Tom Cruise, he's like running around smiling do doing his Tom Cruise thing, but it looks just like him. And I'm pretty technical, and I was pretty convinced. So imagine our non-technical friends and family. In the next year or two, it's going to be extremely scary on how people can actually trust the information that they're viewing online. And one way to do that is through a digital signature, right? Attesting to the authenticity of content being produced. So, we actually built a way for you to hash any piece of content and then attest to it. But, this is just an idea of if you're exploring some

projects for the hackathon, thinking about like attesting to the authenticity of of information and building graphs around that is a is a unique idea. This is an attestation record of fake Tom Cruise. I actually just like changed it in the UI. So, this isn't his ETH address. Uh but, it's Tom Cruise. ETH attesting to a hash of his content. And then, people can verify that content against the hash independently. This could all be done through a really pretty UI, but the idea is having a digital signature from an an uh an authority like a Tom Cruise saying, "This is my content."

Uh if you see us by the booth, we're showcasing this is a open-source app that's all a part of our repo that you can access. You can fork it for this hackathon if you'd like. It'll show you how the SDK works in pretty good detail. But, it allows you to attest to people that you meet in in real life. It's called metirl.org. And um if you want, uh we'll be down at the booth, but you can scan this and it'll take you to metirl with my ENS on there. And you you'll need to make a digital signature with that. Um so, you just attest, "Hey, I met Bryce Allen. ETH." And then, I make a two-way attestation confirming that.

So, on that attestation record, what you'll see is this is actually an off-chain attestation that was made public. There's a UID and then a couple timestamps here. And so, one thing with off-chain um attestations is that they don't have a verifiable timestamp cuz there's no consensus from the network that says this existed. And so what we've done is we we took the UID, right? And we just timestamp that on chain. So you can make you can basically timestamp an off-chain attestation on chain, giving it proof of existence that it was seen.

So gives it more uh more a more trustworthy uh historical record of it. So here's DAC attesting to me that we met IRL true, and then I re-attested to him, and I can show you that in a second. And then from this type of data you can start to build these pretty cool like social graphs. This was actually one built by Kelvin from the Optimism team. It's called coolgraph.eth catalog. I'll actually load it here, but this was people are just attesting This is kind of a meme-y one, right? Attesting to cool people. So you They were walking around just attesting to people, and then other people at the event were attesting attesting to each other as well. But you can start to see this like pretty cool interactive graph of these nodes that were attesting cool to these

other entities, these other ENS addresses. And then you'll see like this one node over here is receiving a lot of attestations. I'm not sure if you can see it through the color, um but this one is receiving a bunch of attestations coming in, but no attestations are going out. And so oh, it's actually this one. This one has more. Um but that's Vitalik's address, right? He's receiving cool person attestations but not issuing any. So you can start to see that there's all these like nodes that kind of hang out outside of the network, which if if you think about aggregating attestations for like Sybil resistance, you can start to see these nodes that kind of hang out alone, right? So someone issued like a thousand new addresses, and they're just attesting to each other. If they're not actually a part of like the trusted

network graph, then you can start to weight them however you'd like. So this was uh the the actual attestation record. It was Kelvin attesting to Vitalik true on chain with the UID, and then the schema that was used was called core person. Private data is extremely important, especially if you're working on identity related things. It's really important to think through like what actually needs to be on chain or not on chain. So, we built a way to attest to basically a Merkle root hash on chain.

And then you can selectively disclose data against that Merkle root. Um that could be more privacy preserving things. So, this is kind of an alternative to like a ZK proof, but it's just uh allowing you to attest to um one entity attesting to like let's say it's a a document verifier for your driver's license, right? They could hash all the different fields on your driver's license, attest to the Merkle root, and then give you that data, and then you could give people leaves of that data to selectively uh the validate against the Merkle root after.

So, it kind of looks like this. Here's the Merkle root hash. You get a proof. You verify against it. I can show you how this works um downstairs, too. So, there's a lot of use cases that can be built. Um we have a use case sheet at our booth if you're looking for some inspiration, but uh attestations are not an identity protocol. You can do way more than that with it because it unlocks a a very composable and interoperable network. So, you can build registries, can anytime you need to prove compliance in a process, notaries, proof of anything like proof of attendance or proof of solvency, things like that. Anytime an entity needs to make use of digital signature and to build some sort of trust in in an interaction is when attestations are are valuable.

So, here are some ideas that you could hack. We're not judging against these, but just to give some inspiration. Hopefully, you can think, "Hey, if I could do this, perhaps I could also do something else." So, social graphs, knowledge graphs, dynamic NFTs based on attestation data, civil resistance, zero-knowledge attestations generating um an attestation based off of So, generating an attestation and generating a proof off of that attestation would be really cool. Attesting to roles. Kind of get the idea there.

So, I can one other thing are these private attestations. I'm going to make one really quick. So, first to start, if you want to make a schema, you can interact with the SDK pretty easily, but if you want to do a no-code way, if you go to the EAS scan on the chain of your choice, then you can use this no-code builder. So, I could say like, you know, event name, and maybe this is just a string, but you can choose the ABI in the field type that you want. And so, I'm going to make just this one make a statement.

And it's just going to be a recipient is to no one, but I'm just saying, "Nice chatting with you all." And one cool thing with an attestation is you can also apply an expiration time. So, if you want them to automatically revoke, that's possible. And so, I'm going to make this off-chain, which is just a 712 type signature. So, I just signed it, and it's completely encoded in the URI fragment of the URL. And oops. And you can store them wherever you want. Locally, you can store them in a centralized place, pass them portably, but EAS doesn't even know that this

existed, but there's a lot of really cool things you can do with private off-chain attestations as well. So, we have a few minutes left, but any would love to hear kind of your reactions and and feedback. Questions? Go for it. No. Do you want to answer? Yeah.

Cuz I've been talking a while. Okay good. So, in the case of a university at like getting an attestation from like a reputable uh entity, you would actually want that attestation from the university or from someone that's capable of verifying uh university degree. So, that the value of the attestation is based on who actually attests. So, like if I attest that like, you know, Bryce has passed uh passed KYC, like it might not mean much to most people, but if Coinbase does, then it then it would. So. Yeah so uh you could create a schema structure for like the diploma or types of whatever information is important, and then you just the digital signature would be made by a trusted authority on that that data type. So, the schema matters less.

It the at the person who's signing the data is what gives the attestation value, unless there's a resolver or a hook on on the schema. Another question. Uh in the case of off-chain attestations, does the chain ID really matter? No. Right. So, I mean uh technically you can as far as as far as bringing off-chain attestations on chain, then yeah, you can actually read any EIP-712 uh signature and just uh uh care about whatever chain ID you want or not. Yeah.

Yep. So, the Met IRL app that we showed you for attesting that people met is a off-chain attestation on mainnet. So, zero gas, but I'm the contracts are on mainnet. But, we are also on chain and off chain. Yes. The on-chain attestation data is public, correct? So, if you're if you're focusing on things like identity and stuff, then you should the think either to use private data attestations, right? Or go completely off-chain.

Just make sure you're not putting like actual private data on chain. So, if you you might want to put private data off-chain and pass them off-chain attestation to some entity where they can share it on like a need-to-know basis. Uh but in general, if you're going to put something on chain, then you maybe want to put like some sort of like uh hash that's uh as uh some sort of salt with it so no one can break it. So, you wouldn't want to actually to put any private data on chain. That's not what we want to do at all. We want to prevent people from doing that. No private information. Yes.

Yeah, so we actually do have a tool on the explorer is So, you you can verify off-chain attestations using our SDK or you can drop any attestation file like directly into our UI and it'll verify using the SDK. Yeah, so if we if we download Well, so this raw data that you can see here, you can just have that and then drop it into the verify off-chain attestation, then it'll see if it verified or not or just use the SDK. Any other questions on off-chain or on-chain?

In the back? Uh can you can you say that a little bit louder? He said, "How do we compare to verifiable credentials?" Okay. Uh so, verifiable credentials typically follow the W3C standard, okay? And there's uh typically so, the W3C uh W3C standard was built not related to blockchain technology, so it has a lot of data, right? So, a lot of off-chain protocols today like Disco and others will use verifiable credentials and I think it that has a lot of value towards like web two interactions and stuff. But W3C standards can also be you can also create like a dispute records and things with attestations in different different ways.

Yeah so the difference is that verifiable credentials were made before blockchain and they have like a ton of data that you wouldn't want to actually put on chain. And also there's no such thing as a schema registry for verifiable credentials. So when people are using verifiable credentials to attest about things there is they've never really thought of any kind of schema registry where any entity can register a topic and then that topic gets its own unique identifier. And so we think that this is much better for being able to decentralize all these kind of like interactions.

Another advantage to think about is also the composability. So if you were to make an attestation like not exactly as a W3C verifiable credential, but if one attestation is made and you want it to be composable with things outside of identity, maybe it's like authenticity of content signatures and things like that, then it allows you to do that in a much easier and faster way. Thumbs up from the front. So he's attesting time is up. But if you have questions related to this would love to show you the kind of how the Merkle tree approach works, but there's a lot of cool things that you can build. Really excited to see just the progress from the previous hackathons. A lot of cool things can be built using AS as an alternative to

NFTs and and things like that. So if you're thinking about NFTs for verification, think maybe an attestation could be used instead.