Paytr - earn money by paying early

Hi Compound family,

First things first: I want to send out a massive thank you to the Compound members, and especially @adam for all the help, and patience :grinning:.

Today I’d like to showcase and explain my first project, called Paytr. It’s an amalgamation of 3 words: Payment, later, interest.

My smart contract allows anyone to pay an invoice in advance, earn interest through Compound, and have the invoice automatically paid on the due date.
You can also use it for escrow and crowdfunding, where there’s no mandatory due date. Later on, the payment due date can be updated to release the payment.

I have a working Goerli smart contract. Because of the mainnet gas fees, I’m doing the interest calculation off-chain. I’d prefer to do everything on-chain, so Compound V3 on Polygon would be a massive help for my project. It would also allow users to pay smaller invoices in advance. It makes little sense to earn $1 of interest and pay $7 in gas fees.

For now, I’m facing 2 difficulties:

  • Due to the off-chain calculation of the interest amounts, I have the payout function as onlyOwner. I push the data array to the smart contract to pay everyone. This obviously causes more gas fees for me. Even if I charge a % fee on the interest earned, I would need a massive number of invoices or huge amounts to be paid through my contract, to cover for the fees. Doing everything on-chain would make it possible for everyone to call the payout function. So it’s a bit of a dillema at the moment.

  • Funding to do a smart contract audit. This is my first project, and I’m bootstrapped.

I’m posting this thread to see if my project would be eligible for a grant. I’d also by happy to receive feedback, answer any questions, or even just people that would like to test the smart contract.

Thanks for your time, thanks for building Compound Finance. It’s an awesome project.

Flowchart here: