What is the AttestationStation?
The AttestationStation is an attestation smart contract deployed on Optimism.
The goal of the AttestationStation is to provide a permissionless and accessible data source for builders creating reputation-based applications. By enabling anyone to make arbitrary attestations about other addresses, we can create a rich library of qualitative and quantitative data that can be used across the ecosystem.
# General FAQ
# What are attestations?
Attestations are statements by a creator (who attested this) about a subject (who is being attested about). Attestations could present any qualitative or quantitative statement. To paint a picture — actors might submit attestations that are contextual to their brand, ecosystem, and governance structure.
# What can attestations be used for?
We imagine the first use case for attestations is to create sybil resistant identity that can power non-plutocratic governance (opens new window).
Longer term, this open-source primitive can be used for a variety of sybil-resistant applications including onchain credit scoring / under collateralized loans.
# How can you go from attestations to sybil-resistant identity?
Attestations in the AttestationStation are onchain and can be used by other smart contracts in a variety of applications. Instead of having a single entity owning user data and identity, the AttestationStation is a graph of peer-to-peer (p2p) attestations.
The first step to get from attestations to sybil-resistant identity is to grow the number of attestations in the AttestationStation. To do that, we are taking a two pronged approach by growing the number of:
- Trusted attestations: These attestations are made by organizations like Gitcoin, DegenScore, Otterspace, etc. attest about individual community members.
- Social attestations: These are attestations from one address about another. Eg zain.eth says kathy.eth is a colleague, kathy.eth says will.eth is a friend, etc.
Anyone can then take the graph of p2p attestations from the AttestationStation and run computations like EigenTrust over the set of data to derive identity sets on top of a purely subjective web of trust.
To build a robust, trustworthy identity network, these computations will be run iteratively. We can start with a purely subjective web of trust, and use that starting point to derive a larger web of trust, and so on — we can begin to establish a credibly neutral reputation that is entirely peer-to-peer.
# How is the AttestationStation different from other attestation products?
The AttestationStation is deliberately dead simple and serves as an invite to ecosystem contributors to come build an open-source and permissionless attestation graph together.
Creating this system in a decentralized and open-source manner is important because it allows for greater inclusion and representation of different perspectives. This can help to ensure that the system is fair and accessible to all, and that it accurately reflects the diversity of the communities it serves.
# How do I use the AttestationStation?
See the tutorial (opens new window). A SDK and CLI for the AttestationStation can be found at @eth-optimism/atst (opens new window). Ready to build your app? Checkout this starter project (opens new window) which has everything you need to get started!
# What are the contract addresses for the AttestationStation?
Network | Address |
---|---|
Optimism Goerli | 0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77 (opens new window) |
Optimism Mainnet | 0xEE36eaaD94d1Cc1d0eccaDb55C38bFfB6Be06C77 (opens new window) |
# What products are built on the AttestationStation?
If your product is using the AttestationStation, make a PR including how you're using attestations to be added to the list 😊
- AttestationStation Interface by sbvegan (opens new window)
- Optimist Score by Flipside (opens new window)
- Optimism Attestor by Clique (opens new window)
- ZK Discord Attestations by Clique (opens new window)
# What indexing is available for the AttestationStation?
# I am building on the AttestationStation but have some questions, where can I discuss these?
The best place to ask any dev related questions is the Telegram Colloborators channel (opens new window). If you need additional support check out this Help Article (opens new window).
# I want to apply for a grant to build on the AttestationStation, how can I do this?
You can learn more about the variety of grants program available at Optimism here. As a reminder, your work should be published to a public GitHub repo.
# What are some things I should build with the AttestationStation?
It will take a huge community effort to realize the potential that reputation has to transform web3. That’s why we started small with the AttestationStation and an open invite to come experiment with us. Head over to the project ideas list for a bunch of fun projects (opens new window) to build today.
# Technical specifications
The following is the breakdown of Optimism's AttestationStation smart contract.
# State
# attestations
The following is the nested mapping that stores all the attestations made.
mapping(address => mapping(address => mapping(bytes32 => bytes))) public attestations;
The following is a struct that represents a properly formatted attestation.
# AttestationData
struct AttestationData {
address about;
bytes32 key;
bytes val;
}
2
3
4
5
# Events
# AttestationCreated
This event is emitted when an attestation is successfully made.
event AttestationCreated(
address indexed creator,
address indexed about,
bytes32 indexed key,
bytes val
);
2
3
4
5
6
# Functions
# attest
function attest(AttestationData[] memory _attestations) public
Records attestations to the AttestationStation's state and emits an AttestationCreated
event with the address of the message sender, address the attestation is about, the bytes32 key, and bytes value.
Parameters:
Name | Type | Description |
---|---|---|
_attestations | AttestationData[] | Array of AttestationData structs. |