Croin – Token with intrinsic credit generation, and potential DAO for Boolean output

Project Name: Croin

Project Track: Web3

Team Name: Croin

Team Member(s): 1 @Biraris

DevPost Project Link: Croin | Devpost

Project Goal:
Croin aims to facilitate a generic tool for web3 that can yield a Boolean output based on inputs from two users/parties. A user (say, creditor) can place certain terms (in common English) against another user (say, debitor). Within a timeframe, if the debitor fulfills the terms, then certain amount is transferred to debitor. Else, it is transferred to the creditor. Such logic manifesting Boolean output can be used by various web3 projects. This would offer an oracle-like functionality for user inputs.

A straightforward use-case of Croin is in trade financing, where conditional payments between two users can be facilitated.

Another use case is NFT verification/validation.

Project Value:
Compliance between offchain/third party user inputs and onchain processing. Any other smart contract can interact with Croin smart contract for various parameters and a boolen value. Croin shall provide the Boolean output based on the smart contract parameters/logic and the offchain user inputs. This opens door for newer use cases and models on the blockchain.

With completely different perspective: conditional payment based on predefined terms is the utmost demand of financial sector. Croin provides a blockchain substitute to trade financing (letter of credit). Such autonomous credit generation & settlement without bank involvement is far efficient, faster & cheaper. This would accelerate adoption of blockchain based commerce.

Project Info:
It is basically a cryptocurrency on Tron that has several intrinsic/inbuilt functionalities. Apart from the transfer & allowance, any user can generate a credit for other users. Each credit has certain properties those are configured while credit generation. These properties are: amount, validity & terms of the credit. If the terms are fulfilled within the validity, then the amount is transferred to the designated person (say, debitor). If the terms don’t meet or validity passes, then the amount is transferred back to the user who generated the credit (say, creditor). The terms can be the trading terms among the creditor & debitor. This credit can be generated & settled effortlessly similar to typical transactions.

The terms need not to be constrained for financial or trading related. They can be anything that leads to Boolean output in general (by logical reasoning). For instance, it can be a bet on some event or instance, or demand validation of a random claim or check whether certain NFT exists in reality. This boolean output can be used by the web2 or web3 programs for straightforward integration.

Hence, Croin offers a generic tool for boolean output.

Project Website: https://croin28.vercel.app/

Project Test Instructions:

  1. Ensure installation of Tronlink browser extension.

  2. Once Tronlink is unlocked & connected, click on login. It will fetch your Tron address.

  3. Accredits page facilitates credit generation, tracking and inquiry. Determine page facilitates voting on a credit (for user role of Trustee). Settle page facilitates chat between the creditor, debitor & trustees. Actuate page facilitates settlement of a credit (for user role of Trustee). Check page facilitates some insights on the affairs.

  4. You shall need the CR tokens. Please email at gauravbiraris@outlook.com mentioning your Tron address to get the tokens or relevant user roles for testing.

Project Details:
The project consists of a smart contract and a dApp. The smart contract ensures execution of the essential functionalities and user roles. Basically it is a TRC-20 token with many additional features.

The dApp is a trivial app facilitating user interactions with the smart contract. It uses Tronlink for authentication and injected tronweb by the wallet in browser. This dApp is built aiming the default use case of trade financing. Yet, it can be used for various use cases as the users can put the terms in reasonable English while credit generation, and the trustees can understand the logic in English.

The dApp is a react app built with typescript and firebase. Firebase database duplicates the data though all the data is currently retrievable from blockchain. In future, we can minimize blockchain data if the cloud database suffices for reliable execution.

We have deployed, tested and optimized the smart contract for transaction costs/energy. We successfully reduced the costs to almost half than initial versions.

Smart Contract links: TRONSCAN | TRON BlockChain Explorer | 波场区块链浏览器

Project Milestones:
Milestone 1: Smart contract programming & testing on Tron-IDE. And subsequent conclusion of optimum smart contract code… till 25 August 24 (completed).

Milestone 2: Deployment of smart contract on Nile testnet and on-chain testing …till 2 September 24 (completed).

Milestone 3: Development, testing & otimization of the dApp at localhost… till 5 October 24 (completed).

Milestone 4: Deployment of the dApp … till 8 October 24 (done)

Milestone 5: Customer survey & field testing of the dApp… till 8 December 24 (planned).

Milestone 6: Deployment of the contract on Tron mainnet and migration of the dApp & database… till 25 December 24 (planned).

Milestone 7: Whitepaper and outreach …1 January 25 (planned).

Croin concept note.pdf (470.7 KB)

We are on mainnet now.
Contract address: TLTp6KvkKJuJmv9TUHaaXATvn5TdofMxyD
dApp: https://croin30.vercel.app/

19 Likes

Welcome to hackaTron S7. Your project offering sounds promising, especially with the potential of simplifying conditional web3 payments. I will like to know the strategy you have in place to handle disputes between the creditor and debitor when there are disagreement?

Again, is there any plan to integrate Croin with existing web3 platforms?

Thank you for the appreciation. Actually, payment is triggered by anonymous group of users known as trustees. These trustees check whether the arguments/documents offered by the debitor (shared within validity) satisfy the terms specified by the creditor. Hence the dispute can arise only if the credit has incorrectly specified the terms while credit creation, or the trustees fail to understand the terms correctly. We minimize the chance of incorrect trustee decision by increasing their number to very large, and not rewarding those who vote against the majority decision. On other hand, it’s unsolicited if creditor incorrectly specifies the terms.

The payment is not triggered by agreement between the parties, but by the trustee community based on the terms mentions & subsequent documents/evidences provided.

We look forward to integrate with some web3 platforms. But initially we want to ensure to offer stand alone functionality & execution. Once we have feasible transaction costs & reliable execution, next step is to integrate with complementary web3 platforms to offer additional value.

2 Likes

Welcome to hackathon S7 Sir, I see your building a platform that allows users to create digital agreements with specific conditions and when these conditions are met, certain actions will happen automatically, like payments or other transactions on the blockchain. Can croin integrate with other dApps or platform and Does it support multiple Blockchain?

And what are the potential use cases for croin beyond trade financing?

2 Likes

welcome team, please who are these trustees? they serves as third parties?

1 Like

Thank you. You appreciate it correctly. As croin is fundamentally a smart contract, it can be integrated with other dApps.

The credit & triggerDecision functionality can be used for the integration. Credit generation can be provided as input and the decisionTriggered event with same creditID can be regarded as the output from the croin from the third party dApp perspective.

It is compatible with the dApps built on other blockchains. The non-Tron dApp needs an extra step of defining tronweb instance and at least 2 Tron addresses. The dApp’s native logic can process the credit parameters and the decision on the creditID.

Verification of physical existence of a digital or web3 property (i.e. NFT) is a potential use case beyond trade financing. Betting (i.e. future decision based on pre-defined constraints) is also an use case. There can be variety of use cases where a Boolean output is needed based on prior information.

1 Like

Welcome to the hackathon session 7
Please give more information on the trade financing aspect of your platform. How do users generate credit and what role do trustees play in ensuring trust and security during transactions?

Trustee is a user role on Croin. Specifically, they are user addresses (i.e. Tron users) who are assigned for this role. Any tron address can be assigned for this role, provided they fairly understand English & reasoning.

As they are anonymous, can be considered as third parties for debitor & creditor.

so i read something like ïf one fulfills the terms, then certain amount is transferred" is this done by a smart contract?

Thanks. Trade financing aims to streamline the trade by avoiding dilemma of advance payment (by creditor) or advance delivery (by debitor). Croin provides a kind of LC (Letter of credit) on blockchain. Any Tron user can generate credit by executing the generateCredit function on smart contract. Easiest way is to do so through the dApp (https://croin28.vercel.app) There credit can be generated through a form. For demonstration, see 1:05 to 3:48 art of this video-
https://youtu.be/MdgOm6PMIo4?si=7Nd-aJHs_ASDWl38

Trustee ensure the trust & security by neutrally (& collectively) determining whether the updates shared by the users satisfy the terms of the credit. It is a group of trustees (called as ballotin) that determines whether the payment should proceed or be reverted. Majority of votes in ballotin is concluded as the decision. All the trustees who voted for majority get equal share in the fee incurred for credit.

1 Like

Yes it is done by the smart contract, but by accounting for opinions of all the trustees assigned for the credit. Votes of trustees, ballotins, other user roles, payment trigger protocol etc. are inbuilt functionalities of the smart contract.

5 Likes

Welcome to session 7
Your project looks amazing especially the idea of a generic tool for facilitating Boolean outputs based on user inputs in web3 is really interesting.
I have some few questions that needs clarity

  • You made mention of firebase for data storage, what steps have you put in place in ensuring the integrity and reliability of this off chain data.

– In terms of security what measures have you placed in ensuring the security of users fund’s held in escrow.

  • How are you going to handle large large numbers of concurrent transaction without experiencing performance issues.
3 Likes

okay great, i get it now

1 Like

Thanks for the insight!

The firebase database is used for dApp while all the crucial data is stored on blockchain. For more clarity, please appreciate that the dApp is just one of the potential dApps for the smart contract interaction. Firebase is used as database for this dApp. Currently, there is no off-chain data needed for the project execution. It is possible to discard some functionalities and migrate some data to off-chain in future. But we think, we should not do this unless huge reduction in transaction (energy) costs is achieved. This is because migrating towards off-chain functionality would reduce our advantage of the generic tool.

Thus for now, the integrity and reliability is ensured by keeping all the crucial data on blockchain. The adjuvant data of the dApp is placed on firebase. Firebase also duplicates some on-chain data to minimize the blockchain interaction for the dApp.

Regarding your second question:
Smart contract itself works as escrow agent and not any dApp. Hence the performance is ensured by the mighty processor of Tron Virtual Machine.

1 Like

@Biraris
Thanks for your quick response and clarification

Here are three questions about the Croin project:

  1. How does Croin ensure the accuracy and reliability of the Boolean outputs generated from user inputs in various scenarios?
  2. What specific features or mechanisms are in place to handle disputes between creditors and debtors regarding the fulfillment of terms?
  3. In addition to trade financing and NFT verification, what other potential applications do you envision for Croin’s oracle-like functionality in the Web3 ecosystem?

Please consider responses below

  1. The accuracy and reliability is ensured by organizing trustees in ballotins. Persons having proficiency/command on specific domain can be grouped in a ballotin and the ballotin can be regarded as the specialist for that domain. In general, accuracy and reliability come from basic human behavior. If voted wrong (i.e. minority), trustee gets no share in the fee and also spends the transaction fees from pocket.
  2. Creditor & debitor dont interact with each other. Creditor had specified the terms while credit generation and debitor chat with the trustees. If there is enough evidence in the chatbox w.r.t. the terms of credit, trustee can vote on the credit. The decision depends on collective consensus of the trustees.
  3. Additionally there can be application in betting, verification of digital assets, conclusion of boolean opinion based on info in public domain. If the applications need specific essential skillset, the special ballotin can be created. Currently the skillset is limited to English language & general reasoning.
1 Like

Welcome to Grand hackathon S7
All the best

1 Like

Welcome to the Hackathon of season 7, you’re project is a very interesting one, please tell me how will you’re token be distributed and what is the incentive for holding you’re token, thank you

Alright, thank you for the response

1 Like