# PortKey - Fiat Loans Against Crypto Collateral With Zero Counterparty Risk ## Abstract The PortKey protocol provides a way for crypto native individuals to take over-collateralized fiat loans against their on-chain assets in a trustless manner with zero counterparty risk. Providing the loans are fiat lenders that can obtain attractive fixed income opportunities for their capital whilst controlling their exposure to any credit risk. The protocol leverages Zero Knowledge Proofs to verify fiat payments in a privacy preserving manner, enabling the fiat and crypto financial worlds to become seamlessly integrated. ## Introduction Crypto native individuals want to hold hard currencies such as ETH, BTC, or even “hard” fiat. However they have requirements for local fiat in the countries they reside in. These local currency requirements vary widely, and include: housing deposits, visa/citizenship capital requirements, and day to day spending. These local fiat currencies are often weak, as anyone who has charted them against hard money knows, so people generally do not want to hold them. Borrowing is a way to short, so meeting these local capital requirements via a loan is a way to meet the fiat requirements imposed on them without taking on the associated directional exposure. So far the only places that offer fiat loans against crypto are the "CeFi" providers such as Nexo, Celisus, or BlockFi. During 2022 we saw many of these platforms collapse, highlighting the significant counterparty risks associated with these centralized systems. For the fiat lender, there is strong appetite to maximize the fixed income on their capital. On-chain interest rates on stablecoins are in general higher than those for fiat. This large variation between rates implies that there is no fluid way for the markets to interact, otherwise the difference would be arbitraged significantly. We believe that one of the reasons for this is that there are not sufficient money markets between crypto and fiat. Connecting these markets would in the short term provide above market rate fixed income opportunities for fiat lenders and in the long term, have the effect of making the yields more efficiently priced. Additionally, the exploding interest in the tokenization of Real World Assets throughout 2023/2024 provides further evidence of the growing delta between available crypto collateral and access to fiat liquidity. Hence why we're excited to introduce Portkey - a protocol where crypto native individuals can take fiat loans out against crypto collateral in a trustless manner with zero counterparty risk. On the other side, the fiat loan providers obtain attractive fixed income opportunities for lending their capital whilst controlling their exposure to any credit risk. ## How It Works PortKey is a protocol that matches crypto native borrowers with fiat native lenders. Due to the fragmented liquidity inherent in P2P platforms, we focus on large capital providers that can act as market makers on the fiat side rather than individuals. These providers will maintain the fiat liquidity to meet the borrowing demand when it appears and will be able to offer a number of loans simultaneously. PortKey can be separated into two sub protocols: an overcollateralized stablecoin lender, and a stablecoin <-> fiat bridge. We discuss each sub protocol before describing the overall interactions. #### Overcollateralized Stablecoin Overcollateralized on-chain stablecoin lending protocols such as Maker or Angle have proved themselves as robust defi primitives over the past few years. PortKey leverages this architecture to handle the loan infrastructure, the key difference is that PortKey stablecoins are always redeemable for their fiat version. This is achieved through the governance of the stablecoin. Each lender has their own stablecoin and therefore vary their governance independently. The key governance parameters that the lender would control are: - **Debt Ceiling**: Controls the amount of stablecoin that can be minted at any time. Lenders must ensure that it never increases beyond their fiat reserves so that they can always meet the fiat redeem demand. - **Whitelist/Blacklist**: Controls who can mint the stablecoin. Lenders will in most cases want some form of KYC on the borrowers as they will need to send and receive fiat from the borrower's bank accounts. - **Accepted Collateral Types and Liquidation LTVs**: Controls which on-chain assets can be used as collateral and how much fiat can be borrowed against each. - **Interest Rates**: Controls the interest rate on the fiat loan. There will be a fixed protocol rate that will accrue to the PortKey treasury from all loans, so the overall rate charged to the borrowers will be the protocol interest rate plus the lender interest rate. Fixed term loans can be achieved by significantly increasing the lender interest rate after a set date to disincentivize late repayments. - **Liquidators**: Controls who can liquidate positions. Lenders may want to handle this process solely themselves (can be very profitable) but also have the opportunity to outsource it to other actors. #### Stablecoin <-> Fiat Bridge The technical advancements that enable a system like PortKey are ZK proofs, which allow the privacy preserving and trustless verification of off-chain data in an on-chain context. [ZKP2P](https://github.com/zkp2p/zk-p2p) builds on this tech to create a trustless offramp where proofs of fiat transfers are brought on-chain and verified within smart contracts. Crypto is locked within the smart contracts and only released if the proofs are valid. Under the hood, their approach allows different sources of data to be utilized for the ZK proofs. Currently they support [ZK-Email](https://github.com/zkemail/zk-email-verify) and [TLS-Notary](https://tlsnotary.org/) which export data from payment confirmation emails and internet content served over TLS respectively. The result is a privacy-preserving trustless P2P fiat on-ramp interoperable with all popular fiat payment rails. All three projects mentioned are supported by the PSE group of the Ethereum Foundation. PortKey can build permissionlessly on top of ZK-P2P: The borrower's newly minted stablecoins can be deposited into the offramp protocol and then the order can be filled trustlessly by the lender. #### User Flows The user flow for the happy paths of loan creation and repayment are described below. Where possible, actions are batched into single transactions that will be executed atomically by the protocol (Represented by the a,b... suffixes). ![image](https://hackmd.io/_uploads/BkogHQtbA.png) ![image](https://hackmd.io/_uploads/r1C-HQFWC.png) ![image](https://hackmd.io/_uploads/rJbQH7FZR.png) #### Deploying a new Lender PortKey will include a process to permissionlessly create a new lender within the system. This will be done by a smart contract factory in a similar way to initializing a new pool in UniswapV3. Each lender will have their own stablecoin contracts but will interact with shared KYC, Escrow, and ZK-P2P instances. Each lender will maintain control over the governance of their own stablecoin in every way except for the PortKey protocol interest rate which will be enforced on all lenders. ![image](https://hackmd.io/_uploads/SJIkGzFbR.png) In the long term, we expect a diverse ecosystem of lenders covering different jurisdictions and risk profiles. However it will take time to develop the required trust and knowledge of the protocol within the wider industry for this to occur. Raising capital to place into a lender managed by our team would allow us to quickly begin meeting the demand for borrowing, solving the cold start problem whilst also generating immediate revenues. ### Edge Cases We now discuss edge cases and how they are mitigated at the protocol level. - **Lender does not send or verify the proof of fiat payment within the allotted time window**: - After the time window is exceeded the borrower can withdraw their collateral with no risk to their capital. However there still is a risk that the lender could grief the borrower as their capital is locked up until the window expires. To mitigate this issue the lender can add their own collateral as a stake in the Escrow Contract which is claimable by any borrower that's loan request was not met. This stake needs to exceed the capital efficiency loss incurred by the borrower's collateral being locked up for a short window period, we imagine 0.1% -1% would be sufficient in most cases. - Additionally, there is a reputational incentive to the lenders. Borrowers can view the historical actions of lenders via their wallet history and therefore can limit themselves to lenders that exceed a certain rate of successful orders. - **Borrower loses access to their fiat payment platform in the middle of the loan duration**: - In this case the borrower will not be able to repay their loan via fiat. However they can always repay via their collateral as described in the User Flows section. ## FAQ - **Whats stopping people just depositing their crypto into a lending protocol like Aave, borrowing a fiat stablecoin then off-ramping that?** Most fiat currencies are not on-chain, and never will be. There is simply not enough demand to support them due to the strong centralizing affects of stablecoins, over 98% of them being USD pegged (as of March 2024). **Crypto native people mostly want to hold USD pegged stablecoins, but off-chain their demands are significantly more varied.** PortKey allows these demands to be met as efficiently and trustlessly as possible. It is also worth considering the lending side, there are multiple orders of magnitude more fiat than stablecoins - with much of this market having strong demand for yield opportunities. If this market was connected to the borrowing demand of crypto native individuals, the opportunity is far larger than what would be possible with a fully on-chain stablecoin lending protocol. - **What about the dirty money being transfered through the platform?** Lenders can choose the level of KYC they desire and can therefore include their own anti-money laundering and security checks. - **How secure are payment emails for verifying fiat payments?** The on-chain verification includes the email domain of the payment provider, so there is no need for trust in the correctness of the email beyond the domain itself. The main consideration is the risk of transactions being reverted. Some payment providers could support this to some degree. It is up to the ZKP2P protocol as to which payment providers are supported since this functionality of PortKey is handled by them. The process of adding new providers is currently centralized among the core team but could become decentralized in future. A more thorough analysis of the security model of ZKP2P can be viewed [here](https://docs.zkp2p.xyz/zkp2p/developer/security). For completeness, we nonetheless consider the cases of payments reversal and how they could be mitigated at the protocol level. - **Lender reverses the loan payment**: In this case, the borrower can prove this transfer on-chain which will write-off the loan and allow them to withdraw their collateral. There is no way for the lender to steal funds so this can only be used as a griefing attack, mitigation for these sorts of attacks would be the same as discussed [here](#Edge-Cases). - **Borrower reverses the loan repayment**: After the borrower repays, verifies on-chain, and withdraws their collateral, they could reverse the repayment and walk away. Payment providers will generally put a time limit on reversing a transaction, so one mitigation approach would be to lock the borrower's collateral for a specified cooldown period after the loan is repayed, such that this window of reversibility is exceeded. In the case that a borrower did reverse the payment, the lender would be able to prove this on-chain and gain access to the collateral. Both cases can be considered optimistic security approaches where in the happy case nothing happens, but if someone acts maliciously then this can be proven and acted on. The cooldown period serves an analogous purpose as the ~1 week dispute period in Optimistic Rollups. Its worth also mentioning that this same reversal risk is present in centralized P2P off-ramping services such as Binance P2P, many of which have handled billions in volume without issues. Any malicious behaviour blacklists the user from the platform, which equally can be done at the protocol level for PortKey. ## Outlook As of March 2024 the total crypto market cap exceeds $2.6T. Enabling trustless ways to use this capital as collateral for fiat loans could unlock an enormous amount of liquidity. We find this a very exciting opportunity, thank you for reading.