Inspiration

The challenges currently faced by the token launch and liquidity bootstrapping space deeply inspired us. While innovative models like the LLBA showed promise, but haven’t yet gained wide traction. Unfortunately, token launches have only become more difficult with time, particularly as regulations have tightened.

Recognising the need for a better way, we were particularly motivated to address these challenges within the Cosmos ecosystem. With limited launch methods and a prevalence of low float chain launches, Cosmos presented a unique opportunity to provide a better solution and prove the concept of an IBC cross-chain launch platform.

What it does

Our submission for this hackathon involves building the prototype of a regulated launchpad that uses on-chain KYC at a smart contract level. Our simplified KYC flow for users enables fully compliant token launches, token issuance, and post-launch trading between KYCed users.

To develop this cross-IBC KYC logic, the Hypersign team has been building the demo and logic leveraging soulbound tokens, DIDs, and ZK-proofs to verify jurisdiction for launches and trading while preserving users' data privacy.

Additionally, we have pieced together the architecture for the issuance of wrapped "r" tokens, which can only be traded or transferred between whitelisted wallets.

How we built it

During phase one of our submission, our focus has been on mapping out the architecture for the model, specifically the UX for KYC and the logic of the on-chain KYC and LBA 2.0 model.

In the demo we have created so far, we built the UI/UX screens for the LBA, airdrop, and KYC user flow. We have developed a clickable prototype to showcase the user experience.

Hypersign build:

  • When we submitted the architecture of cross chain zk-kyc, we knew that this hack is not going to be easy one (later, it was proven) specially when you only have 3 weeks and to be honest we had lack of skill sets (atleast some part of it from technical side). Right after we were notified that we have been selected for the hackathon. First thing was to come up with a strategy. We decided to choose "Make it work" > "Make it right" > "Make it fast" approach. Asked team to focus on "Make it work" first! But even that was not going to easy, we knew.
  • At high level there are two sides of this problem:
    • 1) Work on zero knowledge proof generation and whitelist user's wallet to a whitelist pool contract
    • 2) Work on LBA contracts
  • We then went ahead to devide the first problems in multiple smaller problems:
    • Learn basic of zero knowledge proof (since we were very new to this)
    • Figure out how we can write circuits, what tools/libraries are available for that
    • Make a simple poc of any random circuit (say multiply two numbers and prove factors)
    • Research on how verifiable credentials and decentralised identifiers may work with zero knowledge proof
    • What sort of crypto algorithms are compatible with zkp etc.
    • Learn writing a very basic rust based cosm wasm smart contract
    • Deploy contract on two differnt networks and try to send/query random data from one another
  • We had to attack this problem from multiple fronts since we were not sure what would work and what would not. We devided the team into 3:
    • team A - work on figuring out how interchain query would work, keep learning rust in parallel
    • team B - research on zero knowledge proof (read papers and try to find out logic of writing circuit - conceputally how it can be achieved),
    • team C - figure out what tool are available in ther market for zkp and try to run them in your computer with dummy circuits (just to get hands on). Join their community and ask questions.
  • One advice we had given to our team was - do not worry about this hackathon, just think that we need these knowledges for our future purpose and take it as short project.
  • First break through happend on last day of week2 - we were able to generate zk-proof (although of a dummy circuit) and got them verify on solidity contract. We prepared a simple demo where a token can only be transfered between two kyced whitelisted wallets - this is just for internal team to get some confidence - still we were far away from our actual implementation.
  • Week 3 pressure were mounting, although we had bit of confidence from zkp side of things, but interchain query was still pending and I realised that we need external help. We immediately talked to Larry (from our Delphi hack group) and he came on call the next day and helped.
  • While team A was still sorting out the interchain part, team B could throuh many papers on zkp and understood that their hypothesis of linking zkp with verifiable credential was right. They would know why Decentralised identity and verifiable credential is important for zkp, atleast in this context.
  • Team B give all theoritcal knowledge about circuits to team C who was already equiped with tooling by this time. In no more than 1-2 days team C wrote the actual circuit.
  • Meanwhile, team A gave good news that he was able to do make one query over IBC.
  • It was now time to tie all these together. and we “made it work”!

Challenges we ran into

We encountered a challenge in tackling this complex concept and spent a considerable amount of time deliberating on the best approach for the on-chain KYC, particularly from a user experience perspective. After much discussion, we concluded that the whitelisting verification contract was the optimal solution.

Given the abundance of brain power within our team, it can be challenging to reach a consensus on a specific path to address a problem when multiple complex ways to solve it are available. Additionally, we faced other difficulties while modeling LBA 2.0, including considering various potential variables and determining the best methods to tackle them. We faced a lot of challenges on the development side of the LBA and launchpad parts as some of the original team members got bogged down in their other commitments and had to pull together some dev power last minute who couldn't complete, running out of time on the FE integrations.

Challenges faced by Hypersign

  • The elephant in the room was zero knowledge proof and on top of that making this tech compatible with cosm wasm contracts. Most of the existing implementations (like circom) is compatible with Ethereum ecosystem, which we worked hard to make it compatible with Cosmos (still work is left).
  • Then comes the circuts itself, circuits are complex because they are not like normal programs which we programmers are used to. As a developer we think that a program can take "any" random input and produce desired outputs. But circuits are determisitic, it takes fixed input and produces fixed outputs. They are pure mathematical computation. Now the challenge, it is difficult to write circiuts for anything and everything becuase of a lot of constraints it has.
  • And finally Interchain query, we thought that this would be easier, but to make it work with zk proofs, we struggled a lot and could only finish at the end of the hakcathon.

Accomplishments that we're proud of

Bringing together a highly skilled team and effectively organizing them, mapping out the KYC architecture and establishing a seamless user experience. We are also extremely proud of the stunning design interface created for the LBA.

From hypersign team :

  • Being able to learn and implement completely new but complex subjects like "zero knowledge proof(zkp) cryptography" and "inter chain communication of zk proofs" from scratch in a very short period of time.
  • Being able to convince the entire tech team to work on the vision of next generation Defi which is not only going to be a safer place but even more privacy preserving place to be in.
  • And last but not least I am prod of my team who went a step ahead, learnt completely new topics and then were able to tie them together in UI to finish end to end demo.

What we learned

That sometimes there is a simple fix for seemingly complex problems, this was the case with adding in the whitelist contract to improve the UX. Really learnt a lot in this in regards to team, project management and getting everyone on the same page which was challenging for sure with so many moving parts to the project.

From hypersign team:

  • We started from fundamentals of zero knowledge proof to writing our own custom circuit implementation
  • We also learnt how zero knowledge proofs can be tied to identity - more specifically, how self sovereign identity may work with zkp and why it should.
  • We learnt Rust programming language from scratch and not only wrote complex comsm wasm contracts but also made these contracts talk (via IBC query) deployed on two different networks.
  • We learnt how inter chain query works and how we can leverage interchain queries for zk proof verifications for cross chain zk-KYC
  • Lastly, we learnt that hackathons are never about being perfect, its about proving your hypothesis with right team and proving is fast!

Built With

  • cosmwasm
  • database
  • did
  • hypersign
  • ibc
  • react
  • sbt
  • zk-proofs
Share this project:

Updates