Inspiration
Our journey began with a realization: the ecosystem pages of web3 projects, though crucial for integrity, are a labyrinth of unstandardized data, every website is different. Analyzing these disparate structures is not just tedious but riddled with the risks posed by scam projects. To navigate this chaos, we introduce EcoSync: a synchronized network connecting the dots across web3 ecosystems. Our goal? To streamline data acquisition, spotlight reputable projects, and sideline scammers.
What it does
EcoSync empowers companies to embed their credentials – address, name, logo hash, token, and project description – directly into the blockchain. By linking to other projects in their ecosystem, a network of trust is established. Users can then discern reputable projects and make informed decisions, leveraging these connections as a barometer of credibility and avoiding potential scams.
How we built it
Our toolkit includes the Metamask SDK for blockchain interactions, complemented by The Graph's subgraph and Chainlink Functions for efficient data aggregation. Recognizing the importance of user experience, we've integrated IPFS for seamless logo storage. Regarding Chainlink functions: we wrote the code of functions consumer contract of the following thing: get ecosystem from The Graph subgraph's graphql API and aggregate it to find the most similar company in the entire ecosystem. The similarity to a company is computed as the number of companies who has included or has been included by the company. Regarding The Graph: we store Company and Eco (each entry in the ecosystem) on The Graph's subgraph so we can reduce more gas fee compared to when we get the data from the blockchain directly.
handleCompanyAdded: Save Company entity whenever a new company has added. The event emits name, wallet address, profile photo, token name, and description of the company and we save that data. Also initialise includeCount and includedByCount so that we can track the number of companies which included or is included by the company.
export function handleCompanyAdded(event: CompanyAdded): void {
// Entities can be loaded from the store using a string ID; this ID
// needs to be unique across all entities of the same type
let company = Company.load(event.transaction.from.toHexString());
// Entities only exist after they have been saved to the store;
// `null` checks allow to create entities on demand
if (!company) {
company = new Company(event.transaction.from.toHexString());
}
company.name = event.params.name;
company.walletAddress = event.params.walletAddress;
company.profilePhoto = event.params.profilePhoto;
company.tokenName = event.params.tokenName;
company.description = event.params.description;
company.includeCount = 0;
company.includedByCount = 0;
company.save();
}
handleEcosystemUpdated: Save Eco entity which means a single relation of inclusion of two companies, and update includeCount and includedByCount respectively. Deleting inclusion relation is also handled by this handler, which set isIncluded property to false and reduce includeCount and includedByCount by 1.
export function handleEcosystemUpdated(event: EcosystemUpdated): void {
let id = crypto
.keccak256(
ByteArray.fromHexString(event.params.company1.toHexString()).concat(
ByteArray.fromHexString(event.params.company2.toHexString())
)
)
.toHexString();
let eco = Eco.load(id);
if (!eco) {
eco = new Eco(id);
}
eco.company1Address = event.params.company1;
eco.company2Address = event.params.company2;
eco.isIncluded = event.params.isPartnership;
if (event.params.isPartnership) {
let company1 = Company.load(event.params.company1.toHexString());
let company2 = Company.load(event.params.company2.toHexString());
if (company1) {
company1.includeCount = company1.includeCount + 1;
company1.save();
}
if (company2) {
company2.includedByCount = company2.includedByCount + 1;
company2.save();
}
} else {
let company1 = Company.load(event.params.company1.toHexString());
let company2 = Company.load(event.params.company2.toHexString());
if (company1) {
company1.includeCount = company1.includeCount - 1;
company1.save();
}
if (company2) {
company2.includedByCount = company2.includedByCount - 1;
company2.save();
}
}
eco.save();
}
Challenges we ran into
Verification is not easy. Ensuring that a blockchain address genuinely represents its claimed entity is a puzzle. We decided that verification should be off-chain, real members of the company bd/marketing teams are always in contact, so they should get the address from each other for adding it to the ecosystem. Or it can be posted on the official page of the project: 1 value, address. Our future plan is to evolve into a consensus-based verification model. Smart Contract Logic: One of the primary challenges we encountered with the smart contract was the design and implementation of its underlying data structure, considering that with the increased number of companies, transaction fees will be rising and it was crucial to ensure a good design. In the current contract nesting mappings are utilized to handle the complexity.
Accomplishments that we're proud of
Unity in diversity – that's our team's hallmark. Every member played a pivotal role in developing contracts and collectively tackling a critical bug in transaction submissions. This collective effort is our badge of honor.
What we learned
This hackathon was a crucible of learning. We delved into Chainlink Functions, mastered Subgraph creation, experimented on the Mumbai testnet, and harnessed the power of IPFS.
What's next for EcoSync
Looking ahead, we aim to fortify EcoSync's security and expand its analytical capabilities. We envision advanced data analysis tools, such as intersection and union algorithms for ecosystem analysis, and intricate sorting mechanisms. Our journey has just begun.
Built With
- ganache
- graph-ql
- hardhat
- ipfs
- javascript
- metamask
- metamasksdk
- mumbai
- react
- remix
- solidity
- styled-components
- thegraph
- truffle


Log in or sign up for Devpost to join the conversation.