As a high-school student travelling to hackathons, event waivers are the bane of my existence. Between the hassle of preparing and packing, it's difficult to stay on top of them, and more difficult to prove I signed them when problems arise. At a higher level, the same problem applies to many of our everyday document-sharing needs. We have our doctors using archaic platforms for verifying they've received parent documents, businesses using vulnerable systems to respond to employee-verification requests, and large companies like Hello- and Docusign taking advantage of our naiveness to trap us in their ecosystems for a task as simple as reading and signing an NDA.

What it does

Squaresign attempts to solve this problem by presenting (actually, renewing: see How I built it) a platform where users can upload documents, records, NDA's, you name it, and send a shareable link to their friends, family, employers, etc. When these individuals check the link, they have to sign the documents hash with their public-key before viewing the document (thus verifying that they've received it). Additionally, for forms like waivers, there is the added functionality to have two signature scenarios (once before reading to verify the waiver has been recieved, and once after, to verify acceptance).

Behind the scenes, everything is powered by React, IPFS for document storage, and Squarelink for the custom Web3 provider which brings it all together.

How I built it

To be honest, Squaresign wasn't a completely novel idea. In fact, I've experimented with similar projects (building on IPFS, or tackling document verification through smart contracts) twice before. This time around though, I had the added advantage of the introduction of Squarelink, and a better knowledge of React.

Usually, when I've built projects like this, I've had to rely on MetaMask for DApp-onboarding. This largely prevented me from having a seamless onboarding and user-flow, hindering the average person from using the platform. The last thing I'd want is for my doctor to have to download an extension, go through the hassle of loading their wallet, and THEN learn my platform, just to verify they've received my medical records.

With Squarelink, though, I was able to incorporate an effective Web3 provider which would let me simplify onboarding for new users. By sticking to the familiar email/password-combination system, while still not compromising on security, it let me better refine the platform.

Additionally, it features a complete re-write across the front-end (React) and smart contract (Solidity ~0.4.x -> 0.5.1), with expansion for new features like on-chain ENS subdomain allocation, email alerts, and documentSignFactory (for building a decentralized document indexer: rather than links, showing a dashboard; something that was not possible before).

After the hackathon, I'll be incorporating these changes to the similar OpenSign library as well.

Challenges I ran into

The largest challenge was likely re-writing the smart contract code and subsequently expanding upon it. Performance optimizations were necessary for scaling down ipfs_hash to a byte32 format (to reduce gas costs).

Accomplishments that I'm proud of

In my opinion, the main goal of this hack was to bring onboarding friction to a minimum, and design an effective, pleasant, yet robust front-end. I think I achieved this fairly well by simplifying or abstracting away large parts of the userflow. In fact, across the complete experience, the user doesn't have to provide any additional information besides what is pulled from their Squarelink profile, and the DApp is fully mobile-responsive with support for Web3 providers via MetaMask mobile and other mobile DApp browsers.

What I learned

S/o to the Squarelink team for all the great feedback, help, and fun this weekend. Learned a bunch about their goals and how they're planning on simplifying user adoption and onboarding, and had a lot of fun building on their bounties.

What's next for Squaresign

For the time being, nothing major. I would like to incorporate MetaTransactions (to enable users to not need Ethereum for Gas at all), and ENS sub-domain registration (to enable users to send their friends, family, etc. documents via a custom link) soon. Once this is complete, I will consider requesting ownership of the now defunct OpenSign protocol library and updating it to spec with the new changes.

Built With

Share this project: