Repute is a non-custodial OTC escrow service for special situations opportunities
Repute is a non-custodial OTC escrow service for special situations opportunities. The special situations opportunities often include non-liquid off-chain assets, such as bankruptcy claims and SAFT/SAFE agreements.
Repute is an on-chain OTC escrow service that custodies the fund (addressing centralization risk of the escrow agent) Repute's trade history is on-chain and immutable (reducing counterparty risks via transparency) Gated by Worldcoin (preparing the protocol for KYC/AML compliance)
Here is an example of why an escrow agent is needed and how Repute compares to a traditional escrow agent. Alice has/had $1,000 on FTX, and Alice negotiates a deal with Bob, where Bob pays 10 cents on a dollar for the potential claim.
Trading the bankruptcy claims and reassigning the creditor (person who can receive the claim) from Alice to Bob via traditional means is challenging, for two reasons: 1. affected users are all around the world and in different jurisdictions, which has different rules on trading bankruptcy claims and 2. a lot of affected users are individuals with small ticket size, and it can only scale with a trustless and permissionless platform, instead of the costly and time-consuming traditional means of reassigning the creditor to the claims buyer.
The challenge then becomes, since the claims cannot be transferred easily, it relies on Alice delivering the claims to Bob when the claims become claimable.
However, when the claim becomes claimable, both Alice and Bob would know how much is to be received from the $1,000 claim. Thus if the claim is < $100, Bob will have the incentive to walk from the deal. When the claim is > $100, Alice will have an incentive to walk from the deal.
We want to build a trustless platform where neither Alice nor Bob can walk from the deal once a deal is made.
The existing solution is to have a reputable third party to custody the payments ($100) from Bob, such that Bob does not walk away from the deal. The existing solution also asks Alice to deposit collateral with the third party, such that Alice does not walk away from the deal. If one party reneges on the deal, the counterparty receives the payments/collateral deposited by the reneging party.
However, this setup means both Alice and Bob need to trust the third party. Since bankruptcy cases can go on for multiple years, it requires a lot of trust in the third party. Thus, we are building a decentralized platform that can facilitate this type of OTC deal.
As Alice and Bob are trading an off-chain asset (the claims) with an on-chain asset (Bob's payment), we require an attestor to oversee that Alice has actually delivered the claims to Bob before the smart contract can release the funds.
The OTC deal does not only include the trading of bankruptcy claims. It could also expand to trading airdrop farming addresses, where the airdrop token is not yet claimable. The platform can also facilitate secondary trading of SAFT/SAFE agreements or unvested tokens from VCs.
We used ETHScaffold framework for the project, and Scaffold uses Hardhat for smart contract related things and Next JS for front-end related things.
The contract is tested with Hardhat, and it is deployed on Polygon Mumbai via QuickNode RPC.
We integrated the Worldcoin widget such that users can login and verify address via Worldcoin. The verified address is updated to the smart contract. The smart contract has a mapping(address => bool) public worldIDVerified, such that functions such as postOffer can only be called by verified addresses. However, we did not enforce the check in the deployed contract, because we want to use test cases with Hardhat.
Contract events are indexed by the Graph for a more efficient front-end. Indexed events including different opportunities offered, offers being taken, and offers being settled.
When an offer is settled, the Ethereum Attestation Service generates an off-chain attestation for settled trades. Also, when the offer is settled, the payments will be sent to the seller of the opportunity via smart contract.