We were a group out at dinner and we decided to split the bill. Everyone of course had Venmo accounts, but we had also all been crypto-pilled and wanted to send each other tokens instead. We thought it strange our wallets don't have "Request" buttons to quickly ask each other for $10. So we decided to build a simple protocol to do that.

What it does

Anyone can come to Faktor and call the issue instruction to create a new invoice. Invoices are program accounts that hold data such as a creditor address, debtor address, balance, memo, issued timestamp, etc.

Once an invoice is issued, the debtor account is authorized to call Faktor's pay instruction to pay it down. This instruction transfers lamports from the debtor's account to the creditor and draws down the balance of the open invoice. If the invoice balance reaches zero, Faktor automatically closes the account and transfers the invoice's remaining rent lamports back to the creditor.

We intentionally kept the scope of our deliverable small and ignored the issues of spam, unpaid invoices, and rejecting unwanted requests.

How we built it

We built Faktor using Anchor and React. We are a team of 3 devs and split up work with one member on the Solana backend and the other two members on the frontend. Anchor generates a handy IDL file making it easy to work in parallel. Three weeks ago none of us had ever looked into Solana development before. After we heard about this hackathon, the whole project came together in about 3 weeks:

1st week – Researching and getting familiar with Solana and Rust. 2nd week – Playing around with hello-world programs and getting stuff running. 3rd week – Sprinting to build this demo.

Challenges we ran into

The biggest challenge was just getting through the learning curve of Rust, Solana, Anchor, and blockchains in general. The technology is so new and the community moves so fast that there's not a single consolidated set of resources/videos that makes it easy to get up to speed ( looks promising!). Huge thank you to Armani, Alan, and the folks hanging out in the Anchor discord. This project couldn't have come together without their help.

Accomplishments that we're proud of

Really just humbled by all the insane work everyone in the crypto community has already done and is doing now. The firehose of information is intense and we're really excited to jump in with everyone, try make sense of it, and contribute where we can.

What we learned

A lot! For one, it really pays to adopt a test-driven development approach. Tests help spot bugs and rule out root-causes faster, speeding up workflows and leading to safer programs. This was the first time our team had ever worked with Rust. The learning curve is steep, but the book helps a lot. Where we had a minute to write, we dropped a few breadcrumps:

What's next for Faktor

This hackathon put us in touch with a lot of really great people in the Solana community. We're excited by the things that everyone is working on, and have started to develop a few ideas.

As a team, we some experience building payroll and invoicing applications in the old-school banking world. We're really excited by Solana's potential to improve the way people experience sending and receiving value from one another. In particular, we have an idea for a generalized protocol to trustlessly exchange through inflows (accounts receivable) and outflows (accounts payable). We're currently sourcing feedback and always enjoy meeting new people, so if you're interested in getting chatting reach out to us on Twitter at FaktorFi.

Built With

+ 16 more
Share this project: