RociFi 2.0 Litepaper

RociFi is the first Onchain Credit Scoring Primitive allowing web3 users to monetize their onchain history via lower borrowing rates, higher loan-to-value ratios, or boosted token rewards based on their credit history in DeFi.

The Problem

The majority of lending protocols in DeFi are mere forks of Compound, reproducing the same limitations over and over again. While Compound’s permissionless system revolutionized lending and borrowing, it operates with a “one size fits all” approach, lacking the flexibility and customization needed to cater to individual loan needs.

For instance, Compound does not permit the issuance of customized loans for whitelisted customers based upon some preset criteria like credit score, KYC, or revenue to protocol. The inability to configure collateralization and Annual Percentage Rate (APR) per loan, limits the potential for more nuanced and efficient credit systems in DeFi. Furthermore, it limits growth of DeFi overall as power users are disincentivized as they cannot monetize their onchain history with lower borrowing rates like the real-world. RociFi’s plugin, ExtendiFi, allows customized loan terms and routing to isolated pools based on the protocol’s whitelist criteria.

If ExtendiFi enables DeFi customization, RociFi’s Credit Oracle Network, ROCK, is the brain that powers it with a reliable and performant credit data that any smart contract can call. Smart contracts will be able to call granular credit data on any address with the same simplicity and reliability that they call the price of ETH/USD. This functionality will generate a superior experience for users and boon to DeFi in the next cycle; including under-collateralized lending.

ExtendiFi

RociFi aims to address these limitations by developing Extendifi, a plugin for Compound forks designed to offer flexible loan configurations on a per-loan basis. Extendifi streamlines the loan process: users connect their wallet to the protocol, which sends the wallet information to Extendifi. In turn, Extendifi communicates with our authorized contract and returns signed configuration data for the individual loan.

Extendifi employs a secure, innovative system designed to integrate with existing Compound contracts, adding a layer of customization that significantly enhances the lending process.

Flow diagram

Here’s how this system works:

Signature Verification and Forgery Prevention

ExtendiFi uses the Ethereum ECDSA to generate a contract signature that is central to its security. This contract signature is associated with a certified signer, pre-set in the ExtendiFi contract, which can be easily rotated for added security. For each individual loan, ExtendiFi will provide a signed configuration object either through a web2 (HTTP) or web3 (on-chain contract) API based on DAO’s needs. To ensure that the configurations have not been tampered with, ExtendiFi and the Compound user compare the configuration’s signature against the certified signature. This robust comparison mechanism effectively safeguards the system against forgery of configurations.

“Smart” Pools based on Credit Score

Protocols integrating ExtendiFi will be able to launch custom, isolated pools powered by ROCK’s credit data feeds — Smart Pools. These Smart pools offer customizable loan conditions through ExtendiFi, separating them from standard asset pools to manage risk effectively and provide an environment for testing novel risk management strategies or differentiated offerings.

To explain, core Compound mechanics:

Compound allows you to deposit any asset and then borrow some other assets. This is a global configuration of the protocol. Per every supported deposit asset there is a special debt token aka cToken, in Venus its vToken. It means when a user deposits e.g. BNB, it will get in exchange some amount of vBNB, which accrues interest via elasticity, meaning they appreciate in amount, in the depositor wallet.

The Depositor can borrow some other asset, which is also configured in the protocol. User call borrow(), protocol checks collateralFactor for the given asset and returns requested borrowed asset or rejects if amount doesn’t match.

Final and most important piece is the liquidator, which periodically checks prices and if there is a drop in deposit asset price, tries to liquidate the position if collateralFactor allows it.

Given the above, ExtendiFi creates a separate configuration schedule per asset supported as collateral. For example, for BNB on Venus, we create a new vToken, smartBNB and return the collateral factor per wallet address. Also, each Smart pool will have a unique interest rate model, enabling customized APRs based on credit score per user.

The creation of these pools considers the need for ample liquidity and seamless integration with current dApps, wallets, or services linked to the master protocol.

Everything else works the same as it does in normal flow. The only difference is that protocol users will see an additional item on the “Markets” page, “ROCI-BNB” where depositors can supply BNB in exchange for smartBNB and borrow with tailor-made collateral factor and APR based on their credit score.

The scalability of the system allows the protocol to create unlimited Smart pools based upon higher LTVs, lower APRs, higher token rewards, etc. with an infinite number of combinations driven by a user’s credit score and value KPI to the protocol.

Integration with Compound and Liquidator Access

Depending on specific Compound version, ExtendiFi interacts primarily with only one Compound contract: Comptroller.sol or CompoundLens.sol. The plugin modifies the contract to fetch the collateral factor (health factor) from ExtendiFi instead of using the standard, non-customizable value. This feature enables the creation of individual loan configurations. Liquidators interact with ExtendiFi in a similar manner. To determine whether a debt can be liquidated, the liquidator queries ExtendiFi for the user-specific collateral factor. Then, they compute the HealthFactor and assess the possibility of liquidation.

Data Privacy and Auditability

ExtendiFi is designed to ensure the privacy of user data while maintaining the transparency essential for DeFi protocols. The only information visible on-chain is specific loan properties for individual wallets. No personal data is shared, maintaining user privacy. All operations involving ExtendiFi are visible on-chain, ensuring full transparency and auditability.

Performance and Efficiency

While ExtendiFi introduces an additional call to the borrow method in the lending process, the overall impact on performance and gas efficiency of transactions is minimal. This lightweight call to ExtendiFi is specifically designed to maintain the overall efficiency of the lending protocol.

Dispute Resolution and Fallback Mechanism

In the event of discrepancies in the configuration data returned by ExtendiFi, all possible configurations and web2 or web3 APIs will be public to increase trust. However, the mechanics of mapping between wallets and collateral factors can be kept off-chain or delivered via ROCK, depending on the agreement between the protocol owners and users. In case of unexpected errors or downtime, ExtendiFi has a built-in fallback mechanism. If the ExtendiFi configuration is unavailable, Compound will revert to the default collateral factor and APR, ensuring the lending protocol’s functionality remains uninterrupted.

Risks and Challenges

While the ExtendiFi plugin aims to add flexibility to the Compound lending protocol, the inherent risks of DeFi should not be underestimated. Potential attack vectors, such as the forgery of configuration signatures, are possible. However, to mitigate these risks, RociFi is committed to conducting thorough audits and tests of the ExtendiFi plugin, ensuring the utmost security and reliability for our users.

RociFi Omnichain Credit Oracle Network (ROCK)

ExtendiFi removes a large barrier in DeFi by allowing customization of loan terms based upon preset criteria. But, without proper data intelligence for these now flexible contracts to tap into, new use cases cannot be born.

RociFi was started as a dream to enable under-collateralised lending in Web3 with a user’s on-chain wallet history only. Thus, the RociFi credit score was born. And with it, the ability for Web3 users to monetize their onchain history and reputation.

In short, RociFi’s credit score is a set of Machine Learning models which consume 50+ on-chain data points to produce a risk score between 1 to 10 where 10 is the riskiest and 1 is the least risky. This score is delivered on-chain via web2 API.

Example of RociFi scoring and its components in RA data analytics app

You can read more about our score here, here, or here.

We’re proud to say that our scoring has been battle tested across 20+ Dapps and segments within Web3; including RociFi, Cyberconnect, Sismo, Relation Labs, ImpactMarket, Gora Network, and more.

As strong proponents of decentralized and trustless infrastructure, we aim to proactively increase the degree of decentralization of our existing infrastructure. This is why we’re creating ROCK, RociFi Omni-chain Credit Oracle NetworK.

What problems does ROCK solve?

  • Customized loan terms per user based on their credit history in DeFi, e.g. lower borrow rates or higher loan-to-value ratios to highest quality users
  • Sybil resistance for protocols looking to avoid airdrop farms or those that create fake histories just to harvest rewards
  • Onchain spam filtering for Web3 messaging apps so users have a clear and understandable vetting system in place to avoid malicious or spammy messages
  • Standardized and understandable wallet data for underwriting, risk modeling, or targeted marketing
  • Decentralized and interoperable credit data network for any smart contract to query, permissionlessly

Why do we need score decentralization?

Web3 was built to erase the sins of Web2, not repeat them. Current credit scoring systems are opaque and centralized. Web3’s credit system, ROCK, will be trustless, censorship resistant, and governed as a common good via the $ROCI token.

Currently, our credit scoring system is a black box and centralized to prevent gaming by bad actors. However, RociFi’s vision from the beginning was to eventually decentralize the network to be governed as a public good. Right now is the time to start this process.

As practice shows, good algorithms can be open sourced and still be resistant against gaming if the proper precautions are taken. This is why we will build the whole ROCK infrastructure as transparent as possible, block by block ground up to provide results which are extremely difficult to tamper with.

ROCK components

Nodes Network

ROCK consists of nodes, with every node having client software installed. Node operators are incentivized via transaction fees paid in ROCI tokens.

Like an Ethereum node running a Geth client, every ROCK node operates a credit risk scoring client, fully open sourced.

When a request from the smart contract or any other agent for the data feed, feature or score is coming, one node is elected via discovery service. It can be done based on the fee suggested by the node or on any other criteria. Upon successful response serving, the node is rewarded. If the node fails uptime, consensus or data validity check, it will be slashed.

ROCK foundation will constantly onboard new nodes to increase robustness and decentralization of the network.

Data feeds and ETLs

ROCK will provide verifiable data feeds (VDF), i.e., data with verifiable provenance and validity. For every data feed used in the system, there will be a cryptographic proof, e.g. transactions coming from the AaveV3 on Ethereum would be signed by its key available on chain.

Provenance and consistency of the data sources is essential, otherwise resulting scoring quality will be low, as GIGO principle dictates. RociFi Labs already built a robust ETL infrastructure which is responsible for collecting, cleaning and enriching blockchain data coming from the EVM nodes. Our APIs already allow us to check wallet metrics such as ERC-20 and NFT extended balances, bot and auto trading detection, credit risk and lending patterns, cash flow and PnL data.

The next logical step is migrating our robust Web2 infrastructure and data feeds to a Web3 version with ROCK.

Models, features, scores

By having proven and reliable credit data feeds, any team can use them for building features, underwriting, or training models that can be integrated into existing workflows. ROCK will have Credit Risk and Fraud models out of the box available. All model logic on ROCK will be open sourced and every new model version will go through public audit. Based on user demand, new scores will be developed and added to the node client software, making them publicly available.

Specifically for the Credit Risk Score business logic adjustments, a governance process will be established before pushing any new model version to PROD.

Omni-chain

Today RociFi credit risk scoring consumes data from 8 protocols across 7 different chains and this coverage can be easily upgraded. Similarly, ROCK node software will consume data from the multiple chains making them available for any client on any chain. ROCK will continuously add coverage for more chains based upon user demand.

$ROCI: Lynchpin of the entire system

ExtendiFi and ROCK are both highly symbiotic innovations that will allow DeFi to grow exponentially faster by removing legacy hurdles to innovation with ExtendiFi and granular credit data feeds for new use cases with ROCK.

The entire system is designed to be governed, decentralized, and maintained by the $ROCI token. $ROCI is designed to encourage long term growth of the network while rewarding users most aligned with the protocol’s vision. Holders of $ROCI derive three utilities:

Staking for Data Node Operators

  1. RociFi’s decentralized credit oracle network will operate similarly to Chainlink whereby a decentralized cohort of Nodes push credit data onchain. Nodes will be required to stake collateral that will be slashed if they report incorrect data as to disincentivize bad actors. Good Nodes will be rewarded with 100% of protocol revenue and staking rewards via Node Mining program; paid out in $ROCI.
  2. At launch, Nodes will be required to lock their staked position for 12 months to promote continuity of the network as it grows. However, bad Nodes may be churned on an as needed basis. At launch, Nodes will be required to stake 1M $ROCI as collateral.

Transaction Fees

  1. Protocols that query our Oracle API more than 100 times per month will be charged 100 $ROCI per each 1000 calls afterwards. Users on blockchains with account abstraction that pay in other assets will have their proceeds swapped to $ROCI.
  2. When protocols call the borrow function in ExtendiFi Smart pools, a small $2 transaction fee is charged in the native gas token of the protocol blockchain which is used to buy and burn ROCI.

Governance

  1. $ROCI holders looking to vote in governance will need to stake $ROCI for veROCI, the voting token for the RociFi DAO; rewarding long term stakers with more voting power and reducing whale dominance.
  • 1 veROCI for every 4 year lock of $ROCI
  • 0.75 veROCI for every 3 year lock of $ROCI
  • 0.50 veROCI for every 2 year lock of $ROCI
  • 0.25 veROCI for every 1 year lock of $ROCI
  • 0.02 veROCI for every 1 month lock of $ROCI

Conclusion

The interconnection of the ecosystem is designed to benefit $ROCI by solving a current limitation within DeFi; unlocking a spurt of innovation and new use cases. DeFi lending is incredibly competitive so any protocol integrating ExtendiFi and ROCK will be able to differentiate themselves by offering lower borrow rates or higher loan-to-values to their users.

Users for the first time ever will be rewarded for their wallet behavior, i.e. monetize their onchain history.

--

--