A trust-driven transaction platform enabling free products for buyers and time value earnings for merchants.
Our project is a PayFi minisoftware in Telegram, which we have named TimeFi. Simply put, TimeFi is a trust-driven transaction platform that enables free products for buyers and time-value earnings for merchants. The core idea behind TimeFi is that users lend a certain amount of coins to merchants for a period of time to purchase their goods. Once the lending period expires, the merchants return the borrowed coins to the users. Essentially, users receive the interest from the loan in advance and use it to buy goods, while merchants exchange their goods for temporary ownership of the coins. This concept is both innovative and versatile, with significant potential in various scenarios. On the one hand, TimeFi is particularly well-suited for small and medium-sized businesses or startups seeking funding. For example, imagine Alice runs a small flower shop and wants to expand her business. However, bank loans often require complex credit evaluations, lengthy procedures, and come with high interest rates. In such cases, TimeFi would be a more suitable alternative. Alice’s customers can choose to pay via TimeFi, effectively helping her raise funds, and in return, Alice can offer them mutually agreed-upon products, like a bouquet of flowers. Through TimeFi, Alice can secure substantial, negotiable-interest loans over a short period, with the flexibility of repaying the interest in the form of goods. Isn’t that amazing? If I were Alice, I’d be thrilled to use such a model to gradually scale up my shop without the burden of high bank interest rates and tedious processes. On the other hand, TimeFi is inherently a trust-based payment method that transforms borrowing into a form of transaction, placing a strong emphasis on mutual trust among users. This trust motivates users to adopt TimeFi for payments, and in turn, using TimeFi strengthens their trust in each other. This virtuous cycle not only encourages more users to join the TimeFi community but also fosters a more harmonious and friendly ecosystem. We do think it’s an interesting project, to make a lot of non-cryptors enjoy the cryptocurrency world. Our core application is a Telegram Mini App that bridges merchants and regular consumers. Users can connect their wallets, view their data, and perform both standard and PayFi transactions through this Telegram interface. The TG frontend interacts with the backend, which retrieves user and historical data by querying both the database and blockchain smart contracts. For executing transactions, the TG frontend directly communicates with the smart contracts. In addition to these fundamental capabilities, we have developed a credit system powered by an AI agent. The AI agent processes user transaction history to generate credit scores, which are then relayed to the backend for storage and also written into the smart contract, ultimately determining the borrowing limit available to merchants.
Our project serves as a comprehensive transaction-support platform. We have created our own cryptocurrency through smart contracts, developed a secure and privacy-focused credit evaluation system powered by AI agent, provided a sleek and user-friendly Telegram app, and built a robust, pressure-tested backend using Golang.
For frontend, we provided a telegram application, utilizing @dynamic for wallet connecting and interface beautifying.
For AI agents, we fetch the transaction history using etherscan API, and adopt In-Context Learning prompt strategy to ensure the justice of agent evaluation. Moreover we store as well as compute these data (credit, base number, …) on @Nillion, to further ensure the data privacy and security.
For contract, we built 2 contracts to make sure it works well. The 2 contract have the main functions of : 1. Allow users to buy products from merchant by paying the bill in TimeFi way. 2. Allow merchant to proactively repay loans. 3. Allow contract to repay the loans automatically if the merchant doesn't repay on time. We test it on the localnet in remix. And deployed them on 3 blockchains, including Sepolia, @Flow testnet and @Polygon Pos Amoy testnet.
Backend: Using Go (Golang) with the Gin framework and MySQL, we developed a set of RESTful APIs for merchants and transactions. This includes KYC registration, merchant record management, and querying on-chain data for general and PayFi transactions by wallet address. The Go backend also features scheduled tasks such as daily updates of merchant credit using AI data, triggering automated loan repayments via smart contracts, and daily backups of PayFi transaction records using Akave.