Inspiration

In some places in the world, parents still choose couples for their daughters and sons. No one cares whether they love each other or not. I’d like to give such people a choice, so that their happiness would not depend on other people’s decisions.

My wife and I wanted to register our marriage as quickly as possible but it was not feasible in our home country because of the state rules, so we had to wait for two months in the queue. I want people like us to be able to register their family when they want it regardless of the rules that the state enforces.

I have a couple of friends who had to go to Copenhagen, Denmark to sign their marital agreement because same-sex marriages were absolutely illegal in their home country. I’d love people to be able to get married without the need to go to another country for that.

I believe that current family registering approaches are wrong and I want to challenge them. That’s why I came up with the idea of MarrySign, a platform for registering marriages online, on Blockchain, fully transparently and openly.

Similar to how cryptocurrencies extend our freedom, MarrySign gives us freedom of choice with whom, where and when we'd like to build families despite other people's opinions.

No need to wait in the queue for two months or ask for approval from any people or institutions. We accept any couple at any time. The only thing that matters is the couple’s sincere wish to become a family, and we take care of the rest.

When I was asked by a hackathon mate, would I implement this idea in the real world? I answered positively without thinking. In fact, I’m already building it for the real world.

What it does

MarrySign is a responsive web app that lets any couple get married online. Thanks to the Blockchain backend, the marital agreements are publicly accessible, verifiable and indestructible.

Life is life and a partner can change their mind. For that case, we provide an ability to terminate their marital agreement. However, the terminating partner should pay a pre-agreed compensation to the opposite partner. MarrySign deducts 10% of that compensation as a service fee. Everything else is free on the platform (except moderate gas fees for data changes, of course).

How I built it

The first couple of weeks were dedicated to the backend (Solidity contract). I wrote automated tests for everything using the Hardhat framework, so the development resembled the TTD approach. Learned a few Hardhat starters and borrowed the best pieces from them. Watched a few very relevant sessions given by Chainlink guys and partners. Learned a lot actually.

Next three weeks were spent on designing and developing the frontend (Figma, React, Next.js). Here is where I could demonstrate my passion for front-end development.

When I was Integrating Chainlink PriceFeed during the fifth week, I suddenly realised that it’s not enough to qualify for prizes, so I had to quickly integrate V3AggregatorInterface into my contract. Developed a Solidity library (CurrencyConverter) which communicated with Chainlink and got the latest currency exchange rates.

As it usually happens, everything worked perfectly on my local machine using MochV3AggregatorInterace and Hardhat network, but real work began when I deployed the contract to Goerli network. Had to fix a few hard-to-debug issues, to name a few: number overflow, underflow, insufficient balance. Had to search for more GoerliETH faucets because Chainlink’s one was not enough.

Finally, it makes sense to mention that the project has been built in public. Here is a Twitter thread where I shared my progress and insights starting from brainstorming ideas to launching the app https://twitter.com/kkomelin/status/1572157121214685184

All code is open-sourced here https://github.com/kkomelin/marrysign and https://github.com/kkomelin/marrysign.com
Most of the assets are developed by me in Figma https://www.figma.com/file/fatlcezjL29UUBWS72SKXu/MarrySign-assets?node-id=0%3A1&t=I15MBXpTDBcbP4Uq-1
The contract is on Goerli https://goerli.etherscan.io/address/0xCce4880C3DAf296d87FE710953E12D008608C6A2
And the app is on Vercel https://marrysign.com/

Challenges I ran into

  • Big numbers in JS are not fully supported, so I had to find workarounds and fix things.
  • Lacking float numbers in Solidity made me rethink some calculator logic.
  • It was hard to debug contracts on the Goerli network because of lacking sufficient GoerliETH balance.

Accomplishments that I’m proud of

  • I’ve built my first Web3 app which I believe addresses real world problems and contributes to the common good.
  • I’ve given unique shareable urls to agreements with my custom algorithm
  • Invented my own unique design. None of it has been copied from others. I’ve just unleashed what was inside me.
  • I’ve made the app mobile-friendly because many people in the world still don’t have desktop computers.
  • I’ve decided to store partner's data inside the Agreement.content field in JSON format serialized to Bytes, which makes it possible to extend the data with new fields in the future without deploying a new contract. For example, we could extend it with IPFS CIDs of couples’ pictures.

What I learned

  • How to develop, test and deploy Solidity projects with Hardhat.
  • How to integrate with Chainlink services at the frontend and backend levels.
  • How to treat big numbers in JS.
  • How to work with float numbers in Solidity.
  • How to deploy contracts to a real network.
  • How to verify contracts and analyse what’s going on with a contract through Etherscan.
  • How to connect different wallets and networks to a web app.

What's next for MarrySign

  • Fix known issues (agreement termination doesn’t work on Goerly, agreement wizard UI needs some more love, etc.).
  • Deploy to mainnet.
  • Start customer development and try to find product market fit.
  • Support multiple marriages by the same person (for Arabic countries for example).
  • Support more networks.
  • Make it possible to upload partners’ images. A marriage is about happy pictures for good memories, so IPFS or some other storage could help us.
  • Since the front-end part is totally static, it’d be good to upload it to some decentralised hosting, e.g Arweave.
  • Develop a mobile app.
  • Add templates of vows in different languages/religions/cultures.
  • Make the interface multilingual.
  • Implement email and push notifications.
  • Make it possible to share an agreement via social nets.
  • Generating the list of accepted agreements for the frontpage is resource-consuming operation, so it may exceed network limits which may cause the list to not appear. We need to either optimise it or cache it somewhere off-chain.
  • We use Chainlink Price Feed at the frontend and backend level. On the frontend, the agreement termination depends on it heavily. But we use it without signing up for the service, which means no guarantees provided. So it’s necessary to develop a fallback system at the front-end level to stay operational in case of the unexpected.
  • Add a service worker to improve performance on slow networks (PWA). Improve Lighthouse score (performance and TimeToInteractive in particular).

Built With

Share this project:

Updates

posted an update

Week 5 Update:

Hey everyone,

Konstantin's here again. The week has been tough. Brought a lot of unexpected bugs and tasks.

Here is my (last) week 5 changelog:

  • Finished all planned UI.
  • Added loading indicator to all UI parts which communicate with the chain.
  • Added agreement state visualization.
  • Integrated CL PriceFeeds in Web2 way for converting currencies on the frontend.
  • Integrated CL PriceFeeds into my contract to convert currencies on agreement termination.
  • Deployed contract to the Goreli network https://goerli.etherscan.io/address/0xCce4880C3DAf296d87FE710953E12D008608C6A2
  • Fixed a few hard-to-debug bugs (e.g. related to BigNumbers in JS).
  • Made interfaces responsive.
  • Added app icons.
  • Improved SEO meta-data.
  • Optimized Lighthouse score a little bit.
  • Still working on some documentation and demo.

Once again I sincerely wish you all best of luck! Seriously.. I come from the OpenSource world where we don't compete, we collaborate instead, so as Australians would say "break a leg"!

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

posted an update

Week 4 Update:

Hi there,

Konstantin's here again with my week 4 changelog:

  • Covered all contract methods by UI (new actions added Accept, Refuse and Terminate)
  • Added an agreement view page with a unique url and QR-code for easy sharing
  • Implemented a store (React Context) for reusing popular data across app pages and reducing number of requests to the chain
  • Worked on user flows
  • Recorded a quick demo of the app to check if I can do it at all ;-D It's not easy as it turned out.

Next week won't be easy as I'll need to make the UI user-friendly and integrate with Chainlink DataFeed.

I wish everyone finish your projects on time!

P.S. It's good time now to estimate remaining tasks realistically and cut off some features if you're not keeping up. Directed it to myself as well actually :-D

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

posted an update

Week 3 Update:

Hi everyone,

Here is my week 3 changelog:

  • Introduced “unique“ IDs for the agreements to use them for permalinks.
  • Continue working on UI (accepting and refusing agreements).
  • Added tooling for the contract to auto-generate code docs, lint and calculate test coverage.
  • Written a doc with user-friendly How it Works and FAQ for the landing (not public yet).
  • Come up with a project mission and motto.

Not much of UI progress this week because of my work and travel but docs are also important I think.

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

posted an update

Week 2 Update:

Hey hey hey, Konstantin's here with my week 2 changelog:

  • Finished the contract (more or less) and covered it with tests https://github.com/kkomelin/marrysign
  • Added a simple landing for the project here https://marrysign.com/
  • Used RainbowKit for wallet authentication. Battled with some Next.js-specific issues.
  • Developed a simple list of agreements (not yet public)
  • Developed an agreement creation form (not yet public)
  • Realized that I'm too old to keep up with Next.js releases. Just joking ;-)

From my experience, any project foundation takes more time than consequent development, so I hope to speed up a little bit next week.

Hope you guys are making some progress too.

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

posted an update

Week 1 Update:

Hey everyone,

Konstantin’s here, a MarrySign project developer. MarrySign app will let any couple give their marital vows to each other digitally.

This is my first Blockchain project actually and my brain is exploding already because of all the new stuff. But as requested by the Hackathon organizers, I’d like to share my weekly progress here.

  • Decided to go solo for my tiny project
  • Learned Solidity, Hardhat, Remix
  • Learned about Chainlink services which could potentially help me
  • Come up with a name and bought a domain MarrySign.com
  • Started developing the Solidity contract with automated tests for it https://github.com/kkomelin/marrysign

It’s not much but anyway. I'll be publishing some insights on my Twitter as well https://twitter.com/kkomelin

Good luck everyone!

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