# Table of Contents - [Introducing Size | Size Credit Docs](#introducing-size-size-credit-docs) - [Borrow | Size Credit Docs](#borrow-size-credit-docs) - [Earn | Size Credit Docs](#earn-size-credit-docs) - [Very Liquid Vaults | Size Credit Docs](#very-liquid-vaults-size-credit-docs) - [Risks | Size Credit Docs](#risks-size-credit-docs) - [Contract Addresses | Size Credit Docs](#contract-addresses-size-credit-docs) - [Audits & Security | Size Credit Docs](#audits-security-size-credit-docs) - [Lending (Buying Credit) | Size Credit Docs](#lending-buying-credit-size-credit-docs) - [Offsetting Debt with Credit | Size Credit Docs](#offsetting-debt-with-credit-size-credit-docs) - [In What Situations Are Bids and Offers Filled? | Size Credit Docs](#in-what-situations-are-bids-and-offers-filled-size-credit-docs) - [Position Health & Liquidations | Size Credit Docs](#position-health-liquidations-size-credit-docs) - [Bids & Offers | Size Credit Docs](#bids-offers-size-credit-docs) - [Borrowing (Selling Credit) | Size Credit Docs](#borrowing-selling-credit-size-credit-docs) - [The Term Structure Order Book | Size Credit Docs](#the-term-structure-order-book-size-credit-docs) - [Official Links | Size Credit Docs](#official-links-size-credit-docs) - [2. Accounting System | Size Credit Docs](#2-accounting-system-size-credit-docs) - [2.2 Loans | Size Credit Docs](#2-2-loans-size-credit-docs) - [1. Core Components | Size Credit Docs](#1-core-components-size-credit-docs) - [3.1 Deposit & Withdraw | Size Credit Docs](#3-1-deposit-withdraw-size-credit-docs) - [Technical Docs | Size Credit Docs](#technical-docs-size-credit-docs) - [3. Mechanisms | Size Credit Docs](#3-mechanisms-size-credit-docs) - [2.1 Deposit Tokens & Global Trackers | Size Credit Docs](#2-1-deposit-tokens-global-trackers-size-credit-docs) - [1.1 Fixed-Rate Order Book (FROB) | Size Credit Docs](#1-1-fixed-rate-order-book-frob-size-credit-docs) - [3.2 Limit Orders / Offers | Size Credit Docs](#3-2-limit-orders-offers-size-credit-docs) - [Media Kit | Size Credit Docs](#media-kit-size-credit-docs) - [3.6 Claim | Size Credit Docs](#3-6-claim-size-credit-docs) - [2.3 Fees | Size Credit Docs](#2-3-fees-size-credit-docs) - [3.4 Repayment | Size Credit Docs](#3-4-repayment-size-credit-docs) - [Terms of Use | Size Credit Docs](#terms-of-use-size-credit-docs) - [Privacy Policy | Size Credit Docs](#privacy-policy-size-credit-docs) - [1.2 Limit Orders | Size Credit Docs](#1-2-limit-orders-size-credit-docs) - [4. FAQ | Size Credit Docs](#4-faq-size-credit-docs) - [3.5 Liquidations | Size Credit Docs](#3-5-liquidations-size-credit-docs) - [3.3 Market Orders | Size Credit Docs](#3-3-market-orders-size-credit-docs) - [Email Protection | Cloudflare](#email-protection-cloudflare) --- # Introducing Size | Size Credit Docs It's built on a novel Term Structure Order Book where offers are expressed like yield curves, allowing efficient and continuous pricing across maturities and markets. Risk is siloed, allowing for composability and broad support of different collateral types. #### [](https://docs.size.credit/#the-tldr) The tldr; * Borrow at the best fixed rates for any maturity you choose. Exit early if desired. * Earn duration premiums with ease. Lend against a Collateral Set, or specify your own rates, while earning a competitive variable rate until matched with borrowers. Exit any time. * Speculate on rates by buying and selling credit for any maturity, or target a multiple on the yield curve bid-ask spread. Size has conducted [multiple independent code audits](https://docs.size.credit/security-and-risk/audits-and-security) from top-tier auditors. ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252Fr9lByp7fOH69yW04QMPt%252Fimage.png%3Falt%3Dmedia%26token%3Dce99f0cd-9722-4633-983b-a5a8fa8bbb24&width=768&dpr=4&quality=100&sign=49e327e0&sv=2) [NextBorrow](https://docs.size.credit/highlighted-products/borrow) Last updated 2 months ago --- # Borrow | Size Credit Docs Locking in a fixed rate is simple on Size. It's also the only place where you can pick whatever due date you want for your loan. Simply choose your collateral and any date, and lock in the best available rate for the amount borrowed. Exit early as desired. ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252FCoHbUJbhecnvcdzi0ZEi%252FBorrow%2520Gif.gif%3Falt%3Dmedia%26token%3Dfe69af14-1d11-4eed-ab42-1ab168cc2db4&width=768&dpr=4&quality=100&sign=35b14c5e&sv=2) [PreviousIntroducing Size](https://docs.size.credit/) [NextEarn](https://docs.size.credit/highlighted-products/earn) Last updated 7 months ago --- # Earn | Size Credit Docs Depositing on Size Earn is the simplest way to boost your yield with fixed-rate term premiums. Deposits earn a variable rate until matched with fixed-rate borrowers, targeting a higher-than-variable rate over longer timeframes. ### [](https://docs.size.credit/highlighted-products/earn#collateral-sets) Collateral Sets Collateral Sets are the simplest way to start earning competitive rates. Each Collateral Set specifies which collaterals you're willing to lend against. Rates are managed by a Rate Provider, who maintains competitive fixed rate offers on each lending pair. To get started, simply choose a Collateral Set, sit back, and start earning premium rates. ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252FkEyr8qFxEhaVP7JRK5C4%252Fimage.png%3Falt%3Dmedia%26token%3Df7d13ab3-0562-4eee-9af1-72ae2bc9878d&width=768&dpr=4&quality=100&sign=32a21d4e&sv=2) ### [](https://docs.size.credit/highlighted-products/earn#additional-earn-parameters) Additional Earn Parameters #### [](https://docs.size.credit/highlighted-products/earn#offset) Offset An optional Offset may be set by lenders, which is added or subtracted from the reference rates set by the Rate Provider. This may be useful in controlling how competitive your offer is on the order book. #### [](https://docs.size.credit/highlighted-products/earn#maximum-tenor) Maximum Tenor Additionally, users may set a Maximum Tenor (i.e. 180 days) depending on their time preference. This will prevent borrowers from being able to borrow from them for longer than the Maximum Tenor. #### [](https://docs.size.credit/highlighted-products/earn#minimum-apr) Minimum APR Users may also elect to set a Minimum APR. This may be helpful if the Rate Provider prices rates lower than those at which the user is willing to lend. ### [](https://docs.size.credit/highlighted-products/earn#match-rate-providers-on-specific-pairs) Match Rate Providers on Specific Pairs Alternatively, depositors may specify a Rate Provider for specific collateral(s), or set their own rates themselves. Additional parameters are supported at the contract level, including minAPY, maxAPY, minTenor, and maxTenor, and offset. [PreviousBorrow](https://docs.size.credit/highlighted-products/borrow) [NextVery Liquid Vaults](https://docs.size.credit/highlighted-products/very-liquid-vaults) Last updated 2 months ago --- # Very Liquid Vaults | Size Credit Docs The Size Earn product relies on specialized vaults to earn a variable rate while awaiting matches with fixed-rate borrowers. DeFi's variable-rate lending products target a high utilization rate, meaning that only 10-20% of deposits are typically withdrawable at any given time. The Very Liquid Vaults are designed to safely allocate across strategies up to the amount that is instantly withdrawable, so as to always be available at all times to fixed-rate borrowers. ### [](https://docs.size.credit/highlighted-products/very-liquid-vaults#how-it-works) How It Works The Very Liquid Vaults are ERC-4626 "vault of vaults" that accept user deposits and distribute them across multiple investment strategies to optimize yield while maintaining liquidity (in particular withdrawability). Read more about how they work [here](https://deepwiki.com/SizeCredit/very-liquid-vaults) . ### [](https://docs.size.credit/highlighted-products/very-liquid-vaults#security) Security * ERC4626 property tests from [A16Z](https://github.com/a16z/erc4626-tests) , [Trail of Bits' Crytic](https://github.com/crytic/properties) , and [Runtime Verification](https://github.com/runtimeverification/ercx-tests) * OpenZeppelin's implementation with decimals offset ([A Novel Defense Against ERC4626 Inflation Attacks](https://blog.openzeppelin.com/a-novel-defense-against-erc4626-inflation-attacks) ) * First deposit during deployment with dead shares, pioneered by the [Morpho Optimizer](https://github.com/morpho-org/morpho-optimizers-vaults/blob/a74846774afe4f74a75a0470c2984c7d8ea41f35/scripts/aave-v2/eth-mainnet/Deploy.s.sol#L85-L120) * Timelock for sensitive operations using OpenZeppelin's [TimelockController](https://docs.openzeppelin.com/defender/guide/timelock-roles) * Invariant tests for [a list of system properties](https://github.com/SizeCredit/size-meta-vault/blob/main/test/property/PropertiesSpecifications.t.sol) ### [](https://docs.size.credit/highlighted-products/very-liquid-vaults#audits) Audits Date Version Auditor Report 2025-07-26 v0.0.1 Obsidian Audits [Report](https://github.com/SizeCredit/size-meta-vault/blob/main/audits/2025-07-26-Obsidian-Audits.pdf) TBD v0.1.0 Open Zeppelin TBD ### [](https://docs.size.credit/highlighted-products/very-liquid-vaults#code) Code [![Logo](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2Fgithub.com%2Ffluidicon.png&width=20&dpr=4&quality=100&sign=1bf7b73e&sv=2)GitHub - SizeCredit/very-liquid-vaults: Very Liquid VaultsGitHub](https://github.com/SizeCredit/size-meta-vault) ### [](https://docs.size.credit/highlighted-products/very-liquid-vaults#technical-docs) Technical Docs [Technical docs generated by DeepWiki](https://deepwiki.com/SizeCredit/size-meta-vault) [PreviousEarn](https://docs.size.credit/highlighted-products/earn) [NextAudits & Security](https://docs.size.credit/security-and-risk/audits-and-security) Last updated 1 month ago --- # Risks | Size Credit Docs Despite committing to multiple audits, Size is not immune from blockchain-related risk and smart contract risk. In addition, users should be aware of the below additional risks. Note that this is not intended to be an exhaustive list. ### [](https://docs.size.credit/security-and-risk/risks#technological-risk) Technological Risk **Smart Contract Risk** — Size is a relatively complex credit marketplace. Software bugs or unidentified economic attack vectors may exist. In addition to rigorous internal audits, **three independent audits have been conducted, and reports can be reviewed in the** [**Audits & Security section**](https://docs.size.credit/security-and-risk/audits-and-security) . **Ecosystem Risk** — the protocol currently depends on the Base Layer 2 blockchain which carries some inherent centralization risk around block proposing, building and validation in its current configuration. Intentional or otherwise, transaction censorship at the validator level could detrimentally impact the efficiency or functionality of the protocol. **Transaction Settlement Risk** - Though Base has been stress tested extensively at scale, technical issues or congestion could delay or prevent transaction processing or settlement down to layer 1 which could prevent withdrawals, repayments, and transactions in general. **Third Party Library Risk** — Size relies on some community developed and/or open source components like libraries and/or compilers. This infrastructure is very well maintained and extensively battle tested, but nuances in implementation can introduce technical risk beyond the Size smart contract code itself. **Oracle Risk** — the protocol relies on a Chainlink oracle to conduct liquidations. Manipulation or attack of the Chainlink oracle may result in unprofitable liquidations, lender losses, or borrowers suffering a liquidation penalty unfairly. **Centralization Risk** — the protocol relies on USDC behaving according to a standard ERC-20 token implementation, despite its contract being upgradeable and containing a blocklist. An unexpected upgrade or additions to the blocklist by the USDC token may result in an inability to withdraw. **Integration Risk** — in order to provide lenders with passive variable rate interest while orders are pending match, the protocol relies on Aave operating smoothly to facilitate deposits and withdrawals. Failure to supply or redeem underlying tokens to Aave may result in liquidity being temporarily frozen on the Size protocol. This could happen as a result of Aave capping deposits, resulting in delayed repayment. **Web Frontend and Domain Risk** - frontend UIs have been a repeat attack vector and remain a risk throughout the DeFi ecosystem. All official Size contracts can be found in the documentation; users should always review contract interactions before signing them to ensure they are interacting with legitimate contracts, and best practices include whitelisting specific contracts for interaction. ### [](https://docs.size.credit/security-and-risk/risks#counterparty-risk) Counterparty Risk All loans on Size are over-collateralized, and must be repaid before the due date. Liquidation may be conducted by anyone, including protocol keepers. #### [](https://docs.size.credit/security-and-risk/risks#overdue-loans) Overdue Loans Overdue loans become eligible for liquidation. Anyone, including lenders, may participate in liquidating borrowers for a small reward. **Liquidation Risk** Losses are not socialized, and an unprofitable liquidation of a borrower may result in losses to that borrower's lender(s). Lenders may monitor the health of their borrowers and act as liquidators in the case of borrowers not maintaining sufficient collateral. In addition, a lender may directly claim the borrower's associated collateral if the borrower's collateral ratio drops below 100%. ### [](https://docs.size.credit/security-and-risk/risks#cross-market-lending-risk) Cross-Market Lending Risk If creating simultaneous offers on multiple markets with the same supply asset, a lender is accepting increased adverse selection risk. ### [](https://docs.size.credit/security-and-risk/risks#earn-product-risk) Earn Product Risk Depositing to the Earn product includes the delegation of interest rate pricing to a third-party Rate Provider. Depositors accept responsibility for delegating to this trusted role, and should take care to set a minimum APY and maximum tenor as desired to control against unexpected pricing. ### [](https://docs.size.credit/security-and-risk/risks#governance-risk) Governance Risk **Pausability & Upgradeability** Core contracts may be paused or upgraded. This decision was made in the interest of being able to secure funds and contracts if bugs are found early on, and will be progressively decentralized. A multisig is assigned as owner and can be seen here. [PreviousAudits & Security](https://docs.size.credit/security-and-risk/audits-and-security) [NextContract Addresses](https://docs.size.credit/security-and-risk/contract-addresses) Last updated 2 months ago --- # Contract Addresses | Size Credit Docs Most contracts are deployed under UUPS Upgradeable Proxies. You can confirm the implementation address on the block explorer. These docs are a work in progress, and variables may be changed to adapt to the market. This page may at times be outdated, and we recommend checking the chain if you require certainty. ### [](https://docs.size.credit/security-and-risk/contract-addresses#contract-addresses-governance-variables-and-fees) Contract Addresses, Governance Variables, and Fees The addresses of Size markets and governance variables can be viewed at the Size Registry: [Size Registry](https://size-minimalist-frontend.vercel.app/registry) . The `SizeFactory` contract can be seen below for each deployed chain. Chain Address Ethereum mainnet [0x3A9C05c3Da48E6E26f39928653258D7D4Eb594C1](https://etherscan.io/address/0x3A9C05c3Da48E6E26f39928653258D7D4Eb594C1) Base mainnet [0x330Dc31dB45672c1F565cf3EC91F9a01f8f3DF0b](https://basescan.org/address/0x330Dc31dB45672c1F565cf3EC91F9a01f8f3DF0b) Base sepolia [0x1bC2Aa26D4F3eCD612ddC4aB2518B59E04468191](https://sepolia.basescan.org/address/0x1bC2Aa26D4F3eCD612ddC4aB2518B59E04468191) [PreviousRisks](https://docs.size.credit/security-and-risk/risks) [NextLending (Buying Credit)](https://docs.size.credit/how-it-works/lending-buying-credit) Last updated 1 month ago --- # Audits & Security | Size Credit Docs [](https://docs.size.credit/security-and-risk/audits-and-security#audits) Audits ------------------------------------------------------------------------------------- Size has conducted 10+ external audits to date by several firms, with plans to continuously review code. Date Version Auditor Scope/ Description 2025-06-23 [v1.8](https://github.com/SizeCredit/size-solidity/blob/main/audits/2025-06-23-Omniscia.pdf) Omniscia Incremental audit, fix review 2025-06-23 [v1.8](https://github.com/SizeCredit/size-solidity/blob/main/audits/2025-06-23-Cantina.pdf) Hashlock Incremental audit, fix review 2025-06-14 [v1.8-rc](https://github.com/SizeCredit/size-solidity/blob/main/audits/2025-06-14-Cantina.pdf) Cantina Incremental audit, user vaults 2025-05-26 [v1.8-rc](https://github.com/SizeCredit/size-solidity/blob/main/audits/2025-02-26-Cantina.pdf) Custodia Security Incremental audit, deploy scripts 2025-02-26 [v1.7](https://github.com/SizeCredit/size-solidity/blob/main/audits/2025-02-26-Cantina.pdf) Cantina Full codebase 2025-02-12 [v1.6.1](https://github.com/SizeCredit/size-solidity/blob/main/audits/2025-02-12-Custodia-Security.pdf) Custodia Security Incremental audit, copy trading 2024-12-10 [v1.5.1](https://github.com/SizeCredit/size-solidity/blob/main/audits/2024-12-10-ChainDefenders.pdf) Chain Defenders Incremental audit, fallback oracle 2024-11-13 [v1.5](https://github.com/SizeCredit/size-solidity/blob/main/audits/2024-11-13-Custodia-Security.pdf) Custodia Security Incremental audit, cross-market liquidity 2024-06-10 [v1.0](https://github.com/SizeCredit/size-solidity/blob/main/audits/2024-06-10-Code4rena.pdf) Code4rena Full codebase, $200k competition pot 2024-06-08 [v1.0-rc](https://github.com/SizeCredit/size-solidity/blob/main/audits/2024-06-08-Spearbit.pdf) Spearbit Full codebase 2024-03-26 [v1.0-beta](https://github.com/SizeCredit/size-solidity/blob/main/audits/2024-03-26-Solidified.pdf) Solidified Full codebase [](https://docs.size.credit/security-and-risk/audits-and-security#audits-for-very-liquid-vaults) Audits for Very Liquid Vaults ----------------------------------------------------------------------------------------------------------------------------------- Auditor Date Link Scope/ Description Version Obsidian TBA Link Full codebase 1.0 Open Zeppelin TBA Link Full codebase 1.0 [](https://docs.size.credit/security-and-risk/audits-and-security#internal-audits-and-tests) Internal Audits and Tests --------------------------------------------------------------------------------------------------------------------------- In addition to security audits, we have conducted several internal reviews and taken various measures to ensure that our coding practices meet the highest standards: 1. 93% test coverage (Test-to-Code > 3x) 2. Stateful Invariant Tests (Echidna, Medusa, Foundry 38 properties) 3. Stateless Fuzz Tests (Foundry) 4. Static Analyzers (Slither, Solhint, [LightChaserV3](https://github.com/SizeCredit/size-solidity/blob/main/audits/2024-03-19-LightChaserV3.md) ) 5. Formal Verification (Halmos) 6. Auditable protocol upgrades with Foundry scripts ### [](https://docs.size.credit/security-and-risk/audits-and-security#bug-bounty) Bug Bounty A $50k bug bounty is live on [Cantina](https://cantina.xyz/bounties/c5811be1-cc87-4418-80b0-f0b50f7e5849) . ### [](https://docs.size.credit/security-and-risk/audits-and-security#get-in-touch) Get in Touch security (at) size.credit [PreviousVery Liquid Vaults](https://docs.size.credit/highlighted-products/very-liquid-vaults) [NextRisks](https://docs.size.credit/security-and-risk/risks) Last updated 21 days ago --- # Lending (Buying Credit) | Size Credit Docs _Lending can also be viewed as an exchange of cash for credit, or "buying credit". These terms will be used interchangeably throughout these docs._ [](https://docs.size.credit/how-it-works/lending-buying-credit#lending-buying-credit-with-a-limit-order) Lending (Buying Credit) with a Limit Order -------------------------------------------------------------------------------------------------------------------------------------------------------- Lenders deposit USDC, which earns a variable rate via Aave until matched with a borrower. At the same time, they create a [yield curve offer](https://docs.size.credit/how-it-works/the-term-structure-order-book/bids-and-offers) specifying the rate that they would like to receive across different maturities. For example, a lender may specify a continuous curve defined by the points (1 month, 2.5%), (3 months, 3%), and (1 year, 5%). If a borrower then wanted to borrow for 4 months, they would pay ~3.2% if matched with this lender. Lenders may exit positions early if desired by selling credit through the primary market of other willing lenders. If borrowers fail to repay by the due date, the lender is repaid, and the borrower is liquidated or replaced. [](https://docs.size.credit/how-it-works/lending-buying-credit#lending-buying-credit-with-a-market-order) Lending (Buying Credit) with a Market Order ---------------------------------------------------------------------------------------------------------------------------------------------------------- Users may also submit market orders to buy credit, either filling a bid to borrow or purchasing an existing credit flagged for sale via limit order. This is helpful if you want to quickly lock in a fixed rate as a lender, or when speculating on interest rates dropping. [](https://docs.size.credit/how-it-works/lending-buying-credit#lender-early-exits) Lender Early Exits ---------------------------------------------------------------------------------------------------------- Lenders may exit their obligations early by selling their credit to the lending offer side of the order book, provided there is sufficient liquidity. Upon early exit, a replacement lender is appointed and this lender pays the discounted cash flow value based on the interest rate of the replacement lender for the loan's remaining term. For example, Jim lends 100 USDC at 5% interest for 12 months, so the future value of the loan is 105 USDC (the amount he'll receive 12 months from now). After 6 months, Jim exits to another lender, Kline, with an interest rate of 4%. Kline will now receive the 105 USDC from the borrower at maturity, and thus now has to pay Jim the discounted cash value 105 / (1 + 0.04 \* 6/12) = 102.9 USDC. Kline's 102.9 goes to Jim now, who realizes a 2.9% profit on his initial 100 he lent out, and Kline collects his 105 (including the 2.1 USDC profit) upon repayment by the borrower. _Note: fees are ignored in the examples for simplicity._ [PreviousContract Addresses](https://docs.size.credit/security-and-risk/contract-addresses) [NextBorrowing (Selling Credit)](https://docs.size.credit/how-it-works/borrowing-selling-credit) Last updated 1 year ago --- # Offsetting Debt with Credit | Size Credit Docs Users may assign credit they own to their borrow positions, effectively pointing their future cash flows at their creditor, reducing their debt, and allowing them to withdraw their ETH collateral or eliminate liquidation risk. For a credit to be eligible, it must have a due date sooner than that of the debt position being reduced, and it must correspond to a healthy borrower (not eligible for liquidation). ### [](https://docs.size.credit/how-it-works/offsetting-debt-with-credit#examples-of-reducing-debt-with-receivables) Examples of Reducing Debt with Receivables **Example A** Bob lends with future value 105 USDC due month 3. He then borrows 85 USDC due month 4 using his month 3 receivable as collateral. When the loan due month 3 is paid back to Bob, 85 of the 105 USDC will remain locked to guarantee repayment of his loan due month 4. Bob may then still offer to lend the 85 USDC before his due date month 4, or he may lend out the 20 USDC for any maturity. **Example B** In another example, let’s say Alice borrowed 1000 USDC at 4% with 2 ETH as collateral for 13 months. Subsequently, there is an increase in interest rates. She then lends 1000 USDC at 8% interest for 12 months, meaning she has a 1080 USDC receivable due in 12 months. Since the due date for borrowing is _after_ the date she expects the 1080 to be paid back, and the 1080 is greater than the ~1043 she owes, she can withdraw her 2 ETH, replacing her “real ETH collateral” with her expected cash flow. Read more about the risks and mechanics of cash flow accounting in the Technical Docs. [PreviousIn What Situations Are Bids and Offers Filled?](https://docs.size.credit/how-it-works/the-term-structure-order-book/in-what-situations-are-bids-and-offers-filled) [NextPosition Health & Liquidations](https://docs.size.credit/how-it-works/position-health-and-liquidations) Last updated 4 months ago --- # In What Situations Are Bids and Offers Filled? | Size Credit Docs ### [](https://docs.size.credit/how-it-works/the-term-structure-order-book/in-what-situations-are-bids-and-offers-filled#lending-offer-order-book) **Lending Offer Order Book** Lenders create offers on the Lending Order Book. These offers are filled in the following cases: 1. **Borrow:** someone borrows, and is matched with the lowest rate for their amount and due date 2. **Lender Exit:** another Lender exits their position, and assigns a new lender from the lending order book in their place ### [](https://docs.size.credit/how-it-works/the-term-structure-order-book/in-what-situations-are-bids-and-offers-filled#borrowing-bid-order-book) **Borrowing Bid Order Book** Users may also wish to place bids to borrow. These may be patient borrowers hoping to lock in a low rate or speculators wishing to borrow low, lend high, and repeat. Borrow bids are typically filled in the following cases: 1. **Borrower Exit:** If a borrower wants to exit their loan before the due date, they can assign a replacement borrower from the borrower bid order book in order to not pay full term interest. 2. **Borrower Liquidation:** If a borrower becomes insufficiently collateralized, they will be liquidated. A keeper may select a replacement borrower if it reduces the cost to liquidate. Note: lenders may also submit a market order to match with a borrow bid, but this is typically not desirable (they would be lending at sub-market rates). This is currently not yet supported by the UI. [PreviousBids & Offers](https://docs.size.credit/how-it-works/the-term-structure-order-book/bids-and-offers) [NextOffsetting Debt with Credit](https://docs.size.credit/how-it-works/offsetting-debt-with-credit) Last updated 2 months ago --- # Position Health & Liquidations | Size Credit Docs Position health can be monitored on the Positions page. The collateralization ratio is on a per-market basis, meaning multiple positions on a specific market share collateral. ### [](https://docs.size.credit/how-it-works/position-health-and-liquidations#liquidations) Loan Health Fixed-rate loans use a collateralization ratio (collateral / debt) to measure risk. If the collateralization ratio drops below the liquidation threshold (i.e. 130%), _**all**_ fixed-rate positions owned by that borrower for that market become eligible for liquidation. Positions are liquidated one at a time, and the liquidation threshold may rise back above the liquidation threshold if the liquidation is not unprofitable, giving the user another chance to supply more collateral. ### [](https://docs.size.credit/how-it-works/position-health-and-liquidations#liquidations-1) Overdue Loans Loans not paid back by the due date also become eligible for liquidation. However, a smaller penalty is applied, assuming the loan remains well-collateralized. [PreviousOffsetting Debt with Credit](https://docs.size.credit/how-it-works/offsetting-debt-with-credit) [NextTechnical Docs](https://docs.size.credit/how-it-works/technical-docs) Last updated 2 months ago --- # Bids & Offers | Size Credit Docs Offers may be submitted on either side of the Term Structure Order Book, as offers to lend (buy credit) or bids to borrow (sell credit). Offers are based upon relative dates, and take the form of a continuous curve defined by discrete points. For example, take the following offer: \[(1 hr, 2%), (2 months, 4%), (6 months, 6%), (1 year, 7%)\] ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252F3cMfv0R2WNQmw8gJdJ1T%252FBids%2520and%2520Offers.png%3Falt%3Dmedia%26token%3Dcbe33036-d12a-43e1-8ffb-48c6d3a9b73a&width=768&dpr=4&quality=100&sign=1b365d8d&sv=2) In the image above, a lender created an offer according to the points shown. If a borrower then wanted to borrow for 4 months, they would pay 5% if matched with this lender today. If the borrower picked the same lender a month from now, for the same 4 month duration, the borrower would pay the same 5% rate assuming the lender had not yet updated their offer. [PreviousThe Term Structure Order Book](https://docs.size.credit/how-it-works/the-term-structure-order-book) [NextIn What Situations Are Bids and Offers Filled?](https://docs.size.credit/how-it-works/the-term-structure-order-book/in-what-situations-are-bids-and-offers-filled) Last updated 2 months ago --- # Borrowing (Selling Credit) | Size Credit Docs _Borrowing can also be viewed as an exchange of credit for cash, or "selling credit". These terms will be used interchangeably throughout these docs._ [](https://docs.size.credit/how-it-works/borrowing-selling-credit#borrowing-selling-credit-with-a-market-order) Borrowing (Selling Credit) with a Market Order ------------------------------------------------------------------------------------------------------------------------------------------------------------------- ### [](https://docs.size.credit/how-it-works/borrowing-selling-credit#borrowing) Borrowing Borrowers simply pick the amount they would like to borrow, the amount of collateral they would like to deposit (which determines their collateralization ratio), and the due date for their loan. They are then matched with the lowest fixed rate for that chosen quantity and maturity. Orders of larger sizes may span multiple lender offers and will receive a weighted average rate. ### [](https://docs.size.credit/how-it-works/borrowing-selling-credit#selling-existing-credit-with-a-market-order) Selling Existing Credit with a Market Order Users may sell credit (their expected cash flows from lending) to other users. This allows lenders to exit their positions to other lenders. Speculators or advanced users may also trade credit as a way to speculate on yields, or in an attempt to earn on the bid-ask spread by buying cheap credit (lending at low rates), and selling the credit high, and repeating this to compound earnings. [](https://docs.size.credit/how-it-works/borrowing-selling-credit#borrowing-selling-credit-with-a-limit-order) Borrowing (Selling Credit) with a Limit Order ----------------------------------------------------------------------------------------------------------------------------------------------------------------- Borrowers may also opt to borrow as a limit order. While some users may use this to patiently lock in a lower-than-market rate, it will likely be primarily used to sell existing credit. ### [](https://docs.size.credit/how-it-works/borrowing-selling-credit#selling-existing-credit-with-a-limit-order) Selling Existing Credit with a Limit Order A bid to borrow doubles as an offer to sell existing credit, which is automatically flagged for sale if the user has set a limit borrow bid. You can think of the inverse of a bid to borrow as being the quoted price to sell credit. Users may opt to unenroll all credits as being flagged for sale if a borrow bid is set, or may delist specific credits via the Positions page. [](https://docs.size.credit/how-it-works/borrowing-selling-credit#borrower-early-exits) **Borrower Early Exits** --------------------------------------------------------------------------------------------------------------------- Borrowers may exit their loan before the due date via the [borrower bid side of the order book](https://docs.size.credit/how-it-works/the-term-structure-order-book) . When this happens, a replacement borrower is appointed and the initial borrower pays the discounted cash flow value based on the interest rate of the replacement borrower. For example, Jim borrows 100 USDC at 5% interest for 12 months, so the future value of his loan is 105 USDC (the amount he will need to repay at maturity). After 6 months, Jim exits to another borrower, Kline, with an interest rate of 4%. Kline expects to pay back 105 USDC for borrowing 105 / (1 + 0.04 \* 6/12) = 102.9 USDC. Jim pays Kline 102.9 and avoids paying the full 105 USDC future value to unlock his collateral, thus saving 42% of the full-term interest. _Note: fees are ignored in the examples for simplicity._ [PreviousLending (Buying Credit)](https://docs.size.credit/how-it-works/lending-buying-credit) [NextThe Term Structure Order Book](https://docs.size.credit/how-it-works/the-term-structure-order-book) Last updated 1 year ago --- # The Term Structure Order Book | Size Credit Docs ### [](https://docs.size.credit/how-it-works/the-term-structure-order-book#the-yield-curve-orderbook) The Term Structure Order Book Size relies on a symmetrical order book, with offers to lend (or bids to buy credit) on one side, bids to borrow (or offers to sell credit) on the other. Each side consists of two-dimensional limit orders expressed like a yield curve (maturity x rate). ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252FPEMlYWL8RB3OHrGDm5bT%252FYield%2520Curve%2520Order%2520Book%2520-%2520Chart%25201.png%3Falt%3Dmedia%26token%3Db82480cd-e896-4518-a567-8a980ef2a5a5&width=768&dpr=4&quality=100&sign=4ba2f64c&sv=2) From this we can visualize a simple two-sided aggregate yield curve for any depth: ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252FlxfM8WcTJVAFgGuVppyL%252FYield%2520Curve%2520Order%2520Book%2520-%2520Chart%25202.png%3Falt%3Dmedia%26token%3De5fddf16-2821-423c-bb8c-9d7be33b2695&width=768&dpr=4&quality=100&sign=cd77ee1f&sv=2) [PreviousBorrowing (Selling Credit)](https://docs.size.credit/how-it-works/borrowing-selling-credit) [NextBids & Offers](https://docs.size.credit/how-it-works/the-term-structure-order-book/bids-and-offers) Last updated 2 months ago --- # Official Links | Size Credit Docs * Size App: [https://app.size.credit](https://app.size.credit/) * Website: [https://size.credit](https://size.credit/) * X: [https://x.com/sizecredit](https://x.com/sizecredit) * Telegram: [https://t.me/sizecredit](https://t.me/sizecredit) * Github: [https://github.com/SizeCredit/](https://github.com/SizeCredit/) [Previous4\. FAQ](https://docs.size.credit/how-it-works/technical-docs/4.-faq) [NextTerms of Use](https://docs.size.credit/terms-of-use/terms-of-use) Last updated 4 months ago --- # 2. Accounting System | Size Credit Docs [2.1 Deposit Tokens & Global Trackers](https://docs.size.credit/how-it-works/technical-docs/2.1-deposit-tokens-and-global-trackers) [2.2 Loans](https://docs.size.credit/how-it-works/technical-docs/2.2-loans) [2.3 Fees](https://docs.size.credit/how-it-works/technical-docs/2.3-fees) [Previous1.2 Limit Orders](https://docs.size.credit/how-it-works/technical-docs/1.2-limit-orders) [Next2.1 Deposit Tokens & Global Trackers](https://docs.size.credit/how-it-works/technical-docs/2.1-deposit-tokens-and-global-trackers) Last updated 1 year ago --- # 2.2 Loans | Size Credit Docs A Loan is generated by a match between a borrower and a lender. The borrower owes some debt to the lender, who receives some credit or future cash flow to be claimed at the due date. Debt must be repaid before the due date, otherwise, it is subject to liquidation, and credit can be sold to a third party or used to compensate for debt in a different loan. This specification motivated us to break the Loan structure into two complementary primitives: DebtPositions and CreditPositions: [](https://docs.size.credit/how-it-works/technical-docs/2.2-loans#id-2.2.1-accounting-primitives) 2.2.1 Accounting Primitives ---------------------------------------------------------------------------------------------------------------------------------- ### [](https://docs.size.credit/how-it-works/technical-docs/2.2-loans#id-2.2.1.1-debtposition) 2.2.1.1 DebtPosition DebtPosition is an accounting entity that represents the debt taken by a borrower when a loan is created. They are created as a result of: * a borrowing market order filling a lending limit order or * a lending limit order filling a borrowing market order * a partial repayment with a debt compensation mechanism Its fields are * `borrower` : Borrower * `futureValue`, the amount expected at the due date * `dueDate` : the due date (maturity) * `liquidityIndexAtRepayment` : the liquidity index of the Variable Pool during repayment ### [](https://docs.size.credit/how-it-works/technical-docs/2.2-loans#id-2.2.2.2-creditposition) 2.2.2.2 CreditPosition CreditPositions are credit trackers. They are created either during the creation of a loan, at the same time a DebtPosition is created, or when a lender "sells" some of his credit in exchange for * cash (we call this informally "lender exiting to other lenders") * debt reduction (we call this "debt compensation") Its fields are: * `lender`: Lender * `forSale`: whether this credit position is for sale, by default set to true * `credit`: the amount of credit or future cashflow the lender still have * `debtPositionId`: a link to the DebtPosition When a CreditPosition is sold, in part, a new CreditPosition is created. The exited amount is credited to the buyer and deducted from the seller so that the sum of credit remains constant. This means, in practice, that one loan can have a single debtor and multiple creditors. This 1:N1:N1:N borrower:lendersborrower:lendersborrower:lenders dynamic implies that when the loan is repaid, each lender must be able to claim their owed credit amount after the due date. In order to make the repayment a O(1)O(1)O(1) operation, the borrower transfers the loan's `futureValue` to the Size contract, which deposits it on the Variable Pool, and waits for each lender to claim it after the due date, with variable-rate interest. This flow is explained in more detail in the Repayment section of the documentation. #### [](https://docs.size.credit/how-it-works/technical-docs/2.2-loans#id-2.2.2.2.1-credit-transfer-eligibility-criteria) 2.2.2.2.1 Credit Transfer Eligibility Criteria The criteria established for credit transfer are: 1. the credit has to be healthy i.e. the corresponding debt position must not be underwater * it means that a credit position whose corresponding debt position is underwater can't be sold and not used for compensations (cashless swap) * the reason is that at the moment we have no mechanism to allow pricing in the risk related to the CR since our yield curves allow pricing only for the time value of money i.e. the tenor * so the underlying assumption is all traded credit is non-fungible from the risk perspective, which practically means CR > CRL for us 1. also, the credit has not to be claimable * if a loan is repaid early either by standard repayment or liquidation, the related credit position can be claimed immediately, even before the loan due date, since the money is already in the protocol * however, considering a credit maturing at `T` if it is liquidated at `t < T` and therefore it is claimable at `t` then if the credit is also available for sale somebody can buy it at a discount depending on `T-t` and claim it immediately, resulting in an arbitrage * for this reason, claimable credit is non-transferable. 1. Side note for overdue credit * The easiest solution is to add an additional criteria to the list above, preventing the overdue credit transfer * A lender owning an overdue credit might be OK selling it at a discount because he needs the money then, while another lender might be OK buying that credit at a discount, and profiting from this discount because he is not in a rush and can wait for the liquidation to come. However, since there is no way to price that risk of overdue credit on the yield curve, we have decided to make overdue credit non-transferrable. [](https://docs.size.credit/how-it-works/technical-docs/2.2-loans#id-2.2.2-loan-status) 2.2.2 Loan Status -------------------------------------------------------------------------------------------------------------- The lifecycle of a loan begins when it is created and is considered `ACTIVE`, and ends when it is repaid (zero outstanding debt), either willingly by the borrower or forcibly through a liquidation, set to `REPAID`. An `ACTIVE`loan can become overdue if the current timestamp is greater than its due date. Overdue loans can also be `REPAID` in the same way as active loans. [](https://docs.size.credit/how-it-works/technical-docs/2.2-loans#id-2.2.3-position-ids) 2.2.3 Position IDs ---------------------------------------------------------------------------------------------------------------- Because of this split of the Loan structure into two primitives, each is tracked separately on the Size storage contract in a mapping of DebtPosition and CreditPosition structs. In order to access both structs with a unique identifier, the unsigned integer range was broken in half, so that debt position IDs start at `0`, and credit position IDs start at `type(uint256).max / 2`. This way, it is possible, for example, to fetch the loan status from both a credit position ID and a debt position ID, since the contract can determine at runtime which accounting primitive that identifier belongs to, and determine the remaining debt or maturity. [Previous2.1 Deposit Tokens & Global Trackers](https://docs.size.credit/how-it-works/technical-docs/2.1-deposit-tokens-and-global-trackers) [Next2.3 Fees](https://docs.size.credit/how-it-works/technical-docs/2.3-fees) Last updated 1 year ago --- # 1. Core Components | Size Credit Docs [1.1 Fixed-Rate Order Book (FROB)](https://docs.size.credit/how-it-works/technical-docs/1.1-fixed-rate-order-book-frob) [1.2 Limit Orders](https://docs.size.credit/how-it-works/technical-docs/1.2-limit-orders) [PreviousTechnical Docs](https://docs.size.credit/how-it-works/technical-docs) [Next1.1 Fixed-Rate Order Book (FROB)](https://docs.size.credit/how-it-works/technical-docs/1.1-fixed-rate-order-book-frob) Last updated 1 year ago --- # 3.1 Deposit & Withdraw | Size Credit Docs ### [](https://docs.size.credit/how-it-works/technical-docs/3.1-deposit-and-withdraw#id-3.1.1-deposit) 3.1.1 Deposit * Deposit USDC * Deposit (W)ETH Deposited borrow tokens (USDC) are automatically supplied to the Variable Pool (Aave v3), and begin accruing yield immediately, while a fixed-rate loan is not matched. Collateral tokens (WETH) are deposited on the Size contract. ### [](https://docs.size.credit/how-it-works/technical-docs/3.1-deposit-and-withdraw#id-3.1.2-withdraw) 3.1.2 Withdraw * Withdraw USDC * Withdraw WETH Withdrawals of borrow tokens (USDC) request the amount from the Variable Pool (Aave v3), which is then sent to the user's wallet. Collateral tokens (WETH) are transferred from the Size contract directly. [Previous3\. Mechanisms](https://docs.size.credit/how-it-works/technical-docs/3.-mechanisms) [Next3.2 Limit Orders / Offers](https://docs.size.credit/how-it-works/technical-docs/3.2-limit-orders-offers) Last updated 1 year ago --- # Technical Docs | Size Credit Docs [](https://docs.size.credit/how-it-works/technical-docs#overview) Overview ------------------------------------------------------------------------------- Size is a credit marketplace with unified liquidity across maturities. Initial pairs supported: * ETH: Collateral token * USDC: Borrow/lend token [](https://docs.size.credit/how-it-works/technical-docs#table-of-contents) Table of Contents ------------------------------------------------------------------------------------------------- 1. **Core Components** [1.1 Fixed-Rate Order Book (FROB)](https://docs.size.credit/how-it-works/technical-docs/1.1-fixed-rate-order-book-frob) [1.2 Limit Orders](https://docs.size.credit/how-it-works/technical-docs/1.2-limit-orders) 2. **Accounting System** [2.1 Deposit Tokens & Global Trackers](https://docs.size.credit/how-it-works/technical-docs/2.1-deposit-tokens-and-global-trackers) [2.2 Loans](https://docs.size.credit/how-it-works/technical-docs/2.2-loans) [2.3 Fees](https://docs.size.credit/how-it-works/technical-docs/2.3-fees) 3. **Mechanisms** [3.1 Deposit & Withdraw](https://docs.size.credit/how-it-works/technical-docs/3.1-deposit-and-withdraw) [3.2 Limit Orders / Offers](https://docs.size.credit/how-it-works/technical-docs/3.2-limit-orders-offers) [3.3 Market Orders](https://docs.size.credit/how-it-works/technical-docs/3.3-market-orders) [3.4 Repayment](https://docs.size.credit/how-it-works/technical-docs/3.4-repayment) [3.5 Liquidations](https://docs.size.credit/how-it-works/technical-docs/3.5-liquidations) [3.6 Claim](https://docs.size.credit/how-it-works/technical-docs/3.6-claim) 4. **FAQ** [PreviousPosition Health & Liquidations](https://docs.size.credit/how-it-works/position-health-and-liquidations) [Next1\. Core Components](https://docs.size.credit/how-it-works/technical-docs/1.-core-components) Last updated 1 year ago --- # 3. Mechanisms | Size Credit Docs [3.1 Deposit & Withdraw](https://docs.size.credit/how-it-works/technical-docs/3.1-deposit-and-withdraw) [3.2 Limit Orders / Offers](https://docs.size.credit/how-it-works/technical-docs/3.2-limit-orders-offers) [3.2 Market Orders](https://docs.size.credit/how-it-works/technical-docs/3.3-market-orders) [3.4 Repayment](https://docs.size.credit/how-it-works/technical-docs/3.4-repayment) [3.5 Liquidations](https://docs.size.credit/how-it-works/technical-docs/3.5-liquidations) [3.6 Claim](https://docs.size.credit/how-it-works/technical-docs/3.6-claim) [Previous2.3 Fees](https://docs.size.credit/how-it-works/technical-docs/2.3-fees) [Next3.1 Deposit & Withdraw](https://docs.size.credit/how-it-works/technical-docs/3.1-deposit-and-withdraw) Last updated 1 year ago --- # 2.1 Deposit Tokens & Global Trackers | Size Credit Docs [](https://docs.size.credit/how-it-works/technical-docs/2.1-deposit-tokens-and-global-trackers#id-2.1-deposit-tokens) 2.1 Deposit tokens --------------------------------------------------------------------------------------------------------------------------------------------- In order to address donation and reentrancy attacks, the following measures were adopted: * No withdraws of native ether, only wrapped ether (WETH) * Underlying borrow and collateral tokens (USDC and WETH) are converted 1:1 into ERC-20 deposit tokens via `deposit`, which mints `szaUSDC` and `szWETH`, and received back via `withdraw`, which burns deposit tokens 1:1 in exchange for the underlying tokens. Deposit tokens are non-transferable. #### [](https://docs.size.credit/how-it-works/technical-docs/2.1-deposit-tokens-and-global-trackers#id-2.1.1-aszusdc) 2.1.1 aszUSDC Rebasing token (based on Aave's aUSDC) that tracks the USDC in the system. #### [](https://docs.size.credit/how-it-works/technical-docs/2.1-deposit-tokens-and-global-trackers#id-2.1.1-szweth) 2.1.1 szWETH Standard (non-rebasing) token that tracks (W)ETH in the system for a specific user. [](https://docs.size.credit/how-it-works/technical-docs/2.1-deposit-tokens-and-global-trackers#id-2.2-global-trackers) 2.2 Global Trackers ----------------------------------------------------------------------------------------------------------------------------------------------- Debt tokens are non-transferable. #### [](https://docs.size.credit/how-it-works/technical-docs/2.1-deposit-tokens-and-global-trackers#id-2.2.1-szdebt) 2.2.1 szDebt Borrower total outstanding debt tracker. [Previous2\. Accounting System](https://docs.size.credit/how-it-works/technical-docs/2.-accounting-system) [Next2.2 Loans](https://docs.size.credit/how-it-works/technical-docs/2.2-loans) Last updated 1 year ago --- # 1.1 Fixed-Rate Order Book (FROB) | Size Credit Docs The FROB is an on-chain order book that serves 2 types of markets 1. lending market (buying credit for cash) 2. borrowing market (selling credit for cash) It is possible to place on the FROB both lending and borrowing limit orders and to execute both lending and borrowing market orders. The execution of market orders produces non-fungible positions in the protocol (not tokenized yet) and it is possible to use the limit orders on the FROB to sell this credit / future cashflow for cash at present value. This can be seen as an "early exit" mechanism. A standard order book is two-dimensional since it associates a quantity on the x-axis (usually a price) and a quantity on the y-axis (usually liquidity) The price space is usually discretized and the liquidity in each bin consists of the sum of the liquidity provided by the various makers, by sending limit orders. When a market order is sent, the liquidity is consumed in FIFO order. Example of a spot price order book: ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252F2SvF3NiGWj1RqjmIsCqV%252Fimage.png%3Falt%3Dmedia%26token%3Da9144da0-05e6-45b4-b4f8-ed4662d863c9&width=768&dpr=4&quality=100&sign=600ef213&sv=2) The FROB is instead a 3D order book since, to identify an amount of liquidity, two variables need to be set: * the term of the loan * the lender to borrow from So it can be visualized as a set of N different 2D order books, associating a rate to an amount of liquidity, for N possible terms. The FROB supports both lending and borrowing limit orders. So for a given term, we have a 2D order book for the money market, where: * on the bid side, we have borrowers (credit sellers) who bid rates to borrow money and * on the ask side, we have lenders (credit buyers) who ask rates to lend money Like in a standard order book, in equilibrium condition, we likely observe a bid-ask spread from around the market rate for that specific term. For lending limit orders, the liquidity associated with each order, in each 2D order book, is the full amount of USDC the lender has in the system, so this is a cross-term liquidity system. For borrowing limit orders, the collateral associated with each order, in each 2D order book, is the full amount of ETH the borrower has deposited in the FROB and made available as collateral to borrow. The FROB has no on-chain matching engine on purpose, to avoid having on-chain loops that could make the system unscalable. Size's front-end and back-end systems will help lenders and borrowers borrower to both * place competitive limit orders and * pick the best limit orders given user input preferences [Previous1\. Core Components](https://docs.size.credit/how-it-works/technical-docs/1.-core-components) [Next1.2 Limit Orders](https://docs.size.credit/how-it-works/technical-docs/1.2-limit-orders) Last updated 1 year ago --- # 3.2 Limit Orders / Offers | Size Credit Docs ### [](https://docs.size.credit/how-it-works/technical-docs/3.2-limit-orders-offers#id-3.2.1-place-a-new-fixed-rate-limit-lending-order-lending-offer) 3.2.1 Place a new fixed-rate limit lending order / lending offer See [1.2 Limit Orders](https://docs.size.credit/how-it-works/technical-docs/1.2-limit-orders) ### [](https://docs.size.credit/how-it-works/technical-docs/3.2-limit-orders-offers#id-3.2.2-place-a-new-fixed-rate-borrowing-limit-order-borrowing-offer) 3.2.2 Place a new fixed-rate borrowing limit order / borrowing offer See [1.2 Limit Orders](https://docs.size.credit/how-it-works/technical-docs/1.2-limit-orders) [Previous3.1 Deposit & Withdraw](https://docs.size.credit/how-it-works/technical-docs/3.1-deposit-and-withdraw) [Next3.3 Market Orders](https://docs.size.credit/how-it-works/technical-docs/3.3-market-orders) Last updated 1 year ago --- # Media Kit | Size Credit Docs [](https://docs.size.credit/terms-of-use/media-kit#logos) Logos -------------------------------------------------------------------- ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252Fjd23NWRX9G7hc0NGIUkn%252Fsize-white-logo.png%3Falt%3Dmedia%26token%3D79366ba9-fe82-4a7e-a0e7-86dfbe4cd211&width=768&dpr=4&quality=100&sign=2f6b83b8&sv=2) ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252FEln6t1wduJhqqMr69JXJ%252Fsize-green-logo.png%3Falt%3Dmedia%26token%3D37c6b863-8899-4023-9962-a0c60861c4e7&width=768&dpr=4&quality=100&sign=6f91ebb5&sv=2) ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252FLQ8eRehb3r6C3KhlNWHg%252Fsize-blue-logo.png%3Falt%3Dmedia%26token%3De97ff7d9-5baa-49ad-9e13-bfd8e48e195d&width=768&dpr=4&quality=100&sign=c88fc31b&sv=2) [](https://docs.size.credit/terms-of-use/media-kit#wordmarks) Wordmarks ---------------------------------------------------------------------------- ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252F5VnEH1W5zrVUuRodwqpA%252Fsize-white-wordmark.png%3Falt%3Dmedia%26token%3Df611fa2a-3946-46b7-b725-152fd8980a5b&width=768&dpr=4&quality=100&sign=ff9f29d5&sv=2) ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252FjviiCu5okaigTrWXGQyr%252Fsize-green-wordmark.png%3Falt%3Dmedia%26token%3D01759cbb-0dda-48b2-8a9e-6fe51df50345&width=768&dpr=4&quality=100&sign=a3e590ff&sv=2) ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252FTprnXMnx7EhznKuwqaBF%252Fsize-blue-wordmark.png%3Falt%3Dmedia%26token%3D67149ad0-ec99-47a7-ac50-e19bc951c4b4&width=768&dpr=4&quality=100&sign=3a5f2e21&sv=2) [](https://docs.size.credit/terms-of-use/media-kit#primary-palette) Primary Palette ---------------------------------------------------------------------------------------- ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252FYMjc0I8iIsmorI9dRDae%252FDark%2520blue.png%3Falt%3Dmedia%26token%3D2569300c-d68c-4df1-aff3-d7268ad33fff&width=768&dpr=4&quality=100&sign=7dec5487&sv=2) #FF7E35 ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252FqIKzNgBwP9fYzfKC7S6p%252FByzantine%2520blue.png%3Falt%3Dmedia%26token%3Dd26e0241-4856-48da-ab6d-b7838437bba8&width=768&dpr=4&quality=100&sign=630610d5&sv=2) #308CBF ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252FRydttj92G9yosFW1Q61g%252FAquamarine.png%3Falt%3Dmedia%26token%3Dd8f09613-257e-4716-84f2-7f54b0e412e7&width=768&dpr=4&quality=100&sign=9907acaf&sv=2) #BCDFFF ![](https://docs.size.credit/~gitbook/image?url=https%3A%2F%2F2528244477-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FpBOsA6YaWboKF0jBRj2F%252Fuploads%252F3chatscd7CO7bwDaTF0r%252FWhite.png%3Falt%3Dmedia%26token%3D7d368302-c874-492e-af9a-8aef3f770ea4&width=768&dpr=4&quality=100&sign=92c3e554&sv=2) #FFFFFF [PreviousPrivacy Policy](https://docs.size.credit/terms-of-use/privacy-policy) Last updated 1 year ago --- # 3.6 Claim | Size Credit Docs When a DebtPosition is repaid, either willingly or forcibly through a liquidation, all of the related lender(s), so all the CreditPosition(s) owners, can claim their share of the repaid amount, with accrued interests, since when the USDC enters in the protocol it is deposited into the Variable Pool (Aave v3). Therefore, it generates some yield that belongs to the lender(s), even if they are not directly credited to them. The reason for `Claim` is that the borrower can't repay each lender involved in a DebtPosition directly, because, during the loan lifetime, each lender can exit his credit to multiple lenders. Therefore, at repayment the borrower would be forced to run through a loop of an arbitrarily large amount of lenders, making this repayment potentially unfeasible on-chain because of gas limitations. Since a push approach wouldn't be scalable, the protocol uses a pull approach. The downside here is the lender liquidity gets fragmented into multiple claimable entities. The purpose of `Claim` is to re-aggregate it. The `Claim` method is permissionless. Anybody can claim credit on behalf of a lender. Of course, the effect is that credit is going to be credited to the actual lender and not the caller. Since claiming means interacting with the blockchain in write mode, so consuming gas, each partial credit exit is charged a "fragmentation fee" so that the protocol can both: * fund its bots to do the housekeeping related to calling the `Claim` method to reduce the liquidity fragmentation and * later define an incentive for 3rd party claims on behalf of lenders Also, borrowers who want to borrow from a lender may choose to claim on the lender's behalf to re-aggregate the liquidity and proceed with borrowing more this way. [Previous3.5 Liquidations](https://docs.size.credit/how-it-works/technical-docs/3.5-liquidations) [Next4\. FAQ](https://docs.size.credit/how-it-works/technical-docs/4.-faq) Last updated 1 year ago --- # 2.3 Fees | Size Credit Docs [](https://docs.size.credit/how-it-works/technical-docs/2.3-fees#id-2.3.1-protocol-fee-swapfeeapr) 2.3.1 Protocol Fee (swapFeeAPR) --------------------------------------------------------------------------------------------------------------------------------------- The protocol fees are defined as 0.5% per year on the exchange of credit for cash operations, namely, BuyCreditMarket and SellCreditMarket. The cash recipient always pays for the swap fee. ### [](https://docs.size.credit/how-it-works/technical-docs/2.3-fees#id-2.3.1.1-buycreditmarket) 2.3.1.1 BuyCreditMarket **Numeric examples** **Example 1 (exactAmountIn)** 1. Bob borrows $100 from Alice due 1 year 2. Alice wants to sell her credit at 10% yearly 3. Candy pays $80 to buy a part of Alice's credit 4. Final result: * The fee recipient gets $5 in fragmentation fees plus ($80 - $5) \* 0.005 = $0.375 in swap fees * Candy pays exactly $80 in cash and gets $82.5 = ($80 - $5) \* 1.1 in credit * Alice gets $74.625 = $80 - $5 - $0.375 in cash **Example 1 (exactAmountOut)** 1. Bob borrows $100 from Alice due 1 year 2. Alice wants to sell her credit at 10% yearly 3. Candy wants to purchase $88 worth of credit from Alice 4. Final result: * The fee recipient gets $5 in fragmentation fees plus ($88/1.1) \* 0.005 = $0.4 in swap fees * Candy pays $85 = ($88/1.1) + $5 in cash and gets $88 in credit * Alice gets $79.6 = $88/1.1 - $0.4 in cash ### [](https://docs.size.credit/how-it-works/technical-docs/2.3-fees#id-2.3.1.1-sellcreditmarket) 2.3.1.1 SellCreditMarket **Numeric examples** **Example 1 (exactAmountIn)** Assume the swap fee is 1% yearly 1. Alice borrows $100 from Bob to be repaid with 20% interest in 1 year 2. Candy wants to buy credit and is willing to pay 50% yearly 3. Bob sells his credit to Candy 4. Final result: * The fee recipient gets $0.8 = ($120/1.5) \* 0.01 * Bob gets $79.2 = ($120/1.5) - $0.8 * Candy now owns $120 in credit **Example 2 (exactAmountOut)** Assume the swap fee is 1% yearly 1. Alice borrows $100 from Bob to be repaid with 20% interest in 1 year 2. Candy wants to buy credit and is willing to pay 50% yearly 3. Bob sells credit to Candy and wants to get exactly $50 in cash 4. Final result: * The fee recipient gets $5 in fragmentation fees plus $0.56 = ($50+$5) \* 0.01 / (1 - 0.01) in swap fee * Bob gets exactly $50 in cash * Candy pays $55.56 = $50 + $5 + $0.56 and now owns $83.33 = ($50+$5)\*1.5/(1-0.01) in credit [](https://docs.size.credit/how-it-works/technical-docs/2.3-fees#id-2.3.2-fragmentation-fee) 2.3.2 Fragmentation Fee ------------------------------------------------------------------------------------------------------------------------- When a lender sells his credit to a new lender, for example, or uses it as future cash flow to borrow, a new CreditPosition is created in the process. Eventually, the new CreditPosition will become liquidity at the due date. However, this new CreditPosition will also have to be claimed (see the claim chapter for more details), which means one additional transaction to be sent on-chain, for each credit fractionalization. The Size team intends to run keeper bots to streamline the claim process and aggregate liquidity. However, this operation has some fixed costs in terms of gas, which is why a fixed fee is charged to the user causing the credit split. [Previous2.2 Loans](https://docs.size.credit/how-it-works/technical-docs/2.2-loans) [Next3\. Mechanisms](https://docs.size.credit/how-it-works/technical-docs/3.-mechanisms) Last updated 1 year ago --- # 3.4 Repayment | Size Credit Docs ### [](https://docs.size.credit/how-it-works/technical-docs/3.4-repayment#id-3.4.1-full-repayment) 3.4.1 Full Repayment In the full repayment cycle, the borrower repays a loan entirely providing enough cash to cover the future value. As a result, * that debt position is closed, * the tracker of the aggregated borrower debt is reduced for the amount repaid and this results in some of his collateral being freed up When a position is marked as repaid, the N≥1N\\geq1N≥1 lender(s) can claim the related cash + accrued interests resulting from the repaid money that was deposited on the Variable Pool at the time of the repayment. The `claim` function may also be maintained by a keeper bot so as to maximize available liquidity and avoid lenders having to act upon loan repayment. See the Claim section for more details. ### [](https://docs.size.credit/how-it-works/technical-docs/3.4-repayment#id-3.4.2-partial-repayment-via-compensation) 3.4.2 Partial Repayment via Compensation #### [](https://docs.size.credit/how-it-works/technical-docs/3.4-repayment#id-3.4.2.1-partial-repayment-with-receivables) 3.4.2.1 Partial repayment with receivables A borrower is allowed to reduce part of his debt in a DebtPosition by repaying a specific lender with some of his credit, aka repay with future cashflow. From the accounting system perspective, a borrower who has some credit, aka future cashflow, in the form of a CreditPosition, can "sell" part of this credit to one of the lenders owning some percentage of a DebtPosition where he is the borrower, in exchange for this lender canceling an equivalent amount of the borrower debt. This is allowed provided that the credit due date is earlier than the debt due date, as it is understood that by the time of the debt repayment, the credit will have already been available for claim, as it will have been repaid or liquidated if overdue. This way, the lender who has received the credit is still able to claim his full credit at the due date, when expected. **Observation:** in the event of a credit fractionalization due to the `Compensate` mechanism, the borrower pays the fragmentation fee with collateral. #### [](https://docs.size.credit/how-it-works/technical-docs/3.4-repayment#id-3.4.2.2-partial-repayment-with-debt-credit-creation) 3.4.2.2 Partial repayment with debt/credit creation Since the Repay function only allows for full repayments, borrowers can repay partially by creating a new DebtPosition/CreditPosition pair and then compensating their original loan's debt. This effectively reduces the original loan's debt and creates a new debt. This means that, if no additional money is brought into the protocol, the borrower's total debt balance is not changed. The way to achieve this is by calling `Compensate` with credit position ID equal to `type(uint256).max`, in a similar way as in matching order functions. The whole process can be streamlined in a `multicall`: * deposit * compensate * repay [Previous3.3 Market Orders](https://docs.size.credit/how-it-works/technical-docs/3.3-market-orders) [Next3.5 Liquidations](https://docs.size.credit/how-it-works/technical-docs/3.5-liquidations) Last updated 1 year ago --- # Terms of Use | Size Credit Docs Effective Date: 08 Jan 2025 1\. Welcome to Size! These Terms of Use ("Terms") govern your access to and use of the Size.credit website (referred to as "Size.credit") and the size.credit and app.size.credit interface (referred to as the “Interface") collectively referred to as the "Services." The Services are brought to you by the Size Companies ("we," "us," or "our"). Size.credit provides information and resources about the fundamentals of the decentralized non-custodial liquidity protocol called the Size Protocol, comprised of open-source self-executing smart contracts that are deployed on various permissionless public blockchains, such as Ethereum (the "Size Protocol" or the "Protocol"). The Size Companies does not control or operate any version of the Size Protocol on any blockchain network. The Interface is an independent interface providing one of the available applications through which users, via their self-custodial wallets, interact with the Size Protocol. ARBITRATION NOTICE: THESE TERMS CONTAIN AN ARBITRATION CLAUSE BELOW. EXCEPT FOR CERTAIN TYPES OF DISPUTES MENTIONED IN THAT ARBITRATION CLAUSE, YOU AND WE AGREE THAT ANY DISPUTES RELATING TO THE SERVICES (AS DEFINED BELOW) WILL BE RESOLVED BY MANDATORY BINDING ARBITRATION, AND YOU WAIVE ANY RIGHT TO A TRIAL BY JURY OR TO PARTICIPATE IN A CLASS-ACTION LAWSUIT OR CLASS-WIDE ARBITRATION. You are entering into a binding Agreement. BY ACCESSING OR USING OUR SERVICES, WHICH INCLUDE OUR VARIOUS WEBSITES, INCLUDING, WITHOUT LIMITATION, SIZE.CREDIT (AND ANY RESPECTIVE SUBDOMAINS); APPLICATIONS, AND OTHER SERVICES THAT LINK TO THESE TERMS, AS WELL AS ANY INFORMATION, TEXT, LINKS, GRAPHICS, PHOTOS, AUDIO, VIDEO, OR OTHER MATERIALS STORED, RETRIEVED OR APPEARING THEREON, WHETHER ACCESSED THROUGH THE SITE OR OTHERWISE (COLLECTIVELY, THE “SERVICES”), YOU ARE ENTERING INTO A BINDING AGREEMENT WITH US THAT INCLUDES THESE TERMS, PRIVACY POLICY (FOUND HERE), AND OTHER POLICIES REFERENCED HEREIN (COLLECTIVELY, THE “AGREEMENT”). To the extent that there is a conflict between these Terms and any applicable additional terms, these Terms will control unless expressly stated otherwise. If you don't agree with these Terms, you may not use the Services and should not visit the Site or otherwise engage with the Services. Use of the Services To use the Services, you must legally be able to enter into the Agreement. By using the Services, you represent and warrant that you meet the eligibility requirement. If you do not meet the requirement, you must not access or use the Site or the Services. We may update the Services and the Terms. We may change or update the Services, the Agreement, and any part of the Terms at any time, for any reason, at our sole discretion. Once any part of the Agreement is updated and in effect, you will be bound by the Terms if you continue to use the Services. We may, at any time, and without liability to you, modify or discontinue all or part of the Services (including access to the Services via any third-party links). 2\. Services Size.credit is an informational resource about the Protocol; however, it is not the exclusive or sole source. All information provided in connection with your access and use of the Services is intended for informational purposes only. While we strive to provide accurate and reliable information, we cannot guarantee the accuracy, completeness, or timeliness of the information provided. It is possible that the information may be outdated or subject to errors or omissions. The codebases of all the versions of the Size Protocol are maintained on each full network node of the relevant blockchain. You should not take, or refrain from taking, any action based on any information contained on Size.credit, including, without limitation, any documentation linked from the Services ("Developer Docs") or any other information that we make available at any time, including blog posts, data, articles, links to third-party content, discord content, news feeds, tutorials, tweets, and videos. You further acknowledge and agree that we will not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with the use of or reliance on any such content, goods, or services available on or through any such site or resource. Users retain full control over their cryptoassets. It is important to understand that neither we nor any affiliated entity is a party to any transaction on the blockchain networks underlying the Size Protocol; we do not have possession, custody or control over any cryptoassets, or any user’s funds. You understand that when you interact with Size Protocol, you retain control over your cryptoassets at all times. Users use third-party self-custodial wallets to interact with the Size Protocol; we have no control or guarantee over the wallets. To interact with the Size Protocol using the Interface, you will need to connect and engage with it through your self-custodial wallet. It's essential to understand that your self-custodial wallet is provided by a third-party entity and is generally governed by separate terms and conditions set by the respective third-party service provider. These terms and conditions may involve additional fees, disclaimers, or risk warnings regarding the accuracy and reliance on the provided information. Reviewing and comprehending the terms and conditions associated with your chosen self-custodial wallet provider to ensure compliance and to be aware of any applicable charges or risks is your sole responsibility. We are not intermediaries to the Size Protocol transactions. Due to the non-custodial and decentralized nature of the technology, we are not intermediaries, agents, advisors, or custodians, and we do not have a fiduciary relationship or obligation to you regarding any other decisions or activities that you affect when using our Services. We have no information about all Protocol transactions beyond what is publicly available via the blockchain. You acknowledge that we do not have information regarding all Size Protocol transactions beyond what is available or obtainable publicly via the blockchain. However, we may collect information regarding the users of the Services in accordance with our Privacy Policy. There may be associated blockchain fees. Transactions using blockchains may require the payment of gas fees, which are essentially network transaction fees paid on every transaction that occurs on the selected blockchain network. Please note that gas fees are non-refundable. We do not provide any services to users or deliver, hold, and/or receive payment for cryptoassets. We do not receive any fees for any transactions or the Services. 3\. Assumption of Risk You assume the risks of engaging in novel and experimental technology. Technologies such as smart contracts on various blockchains, cryptographic tokens generated by the smart contracts, and other nascent software, applications, and systems that interact with blockchain-based networks are experimental, speculative, inherently risky, and subject to change. Among other risks, bugs, malfunctions, cyberattacks, or changes to the applicable blockchain (e.g., forks) could disrupt these technologies and even result in a total loss of cryptoassets, their market value, or digital funds. We assume no liability or responsibility for any such risks. If you are not comfortable assuming these risks, you should not access or engage in transactions using blockchain-based technology. We are not liable for any third-party services or links. We are not responsible for the content or services of any third-party, including, without limitation, any network or apps like Discord or MetaMask, and we make no representations regarding the content or accuracy of any third-party services or materials. The use and access of any third-party products or services, including through the Services, are at your own risk. Please note that we do not have control over third-party services. Consequently, we cannot guarantee, endorse, or recommend such content or services to users of the Interface, nor can we endorse their use for any specific purpose. You agree to the automated collection and disbursement of proceeds by smart contracts. You acknowledge and agree that all transactions accessed through the blockchain-based networks will be automatically processed using one or more smart contracts. By engaging in transactions using the Services, you acknowledge and consent to the automatic processing of all transactions in connection with using the Services. You further acknowledge and agree that the applicable smart contract will dictate how the funds of a transaction and ownership of cryptoassets are distributed. You acknowledge the risks of using the Services. You bear sole responsibility for evaluating the Services before using them, and all transactions on the blockchain are irreversible, final, and without refunds. The Services may be disabled, disrupted, or adversely impacted as a result of sophisticated cyber-attacks, surges in activity, computer viruses, and/or other operational or technical challenges, among other things. We disclaim any ongoing obligation to notify you of all the potential risks of using and accessing our Services. You agree to accept these risks and agree that you will not seek to hold any Size Companies Indemnified Party responsible for any consequent losses. You are solely responsible for the security of your self-custodial wallet. You understand and agree that you are solely responsible for maintaining the security of your self-custodial wallet. You alone are responsible for securing your private keys. We do not have access to your private keys. Any unauthorized access to your self-custodial wallet by third parties could result in the loss or theft of any cryptoasset or funds held in your account and any associated accounts. You understand and agree that we have no involvement in, and you will not hold us responsible for managing and maintaining the security of your self-custodial wallet. The private key associated with the self-custodial wallet address from which you transfer cryptoassets or the private key associated is the only private key that can control the cryptoassets you transfer into the smart contracts. We reserve the right to restrict your access from engaging with the Services. You agree that we have the right to restrict your access to the Services via any technically available methods if we suspect, in our sole discretion, that (a) you are using the Services for money laundering or any illegal activity; (b) you have engaged in fraudulent activity; (c) you have acquired cryptoassets using inappropriate methods, including the use of stolen funds to purchase such assets; (d) you are the target of any sanctions administered or enforced by the U.S. Department of the Treasury’s Office of Foreign Assets Control (“OFAC”), the United Nations Security Council, the European Union, Her Majesty’s Treasury, or any other legal or regulatory authority in any applicable jurisdiction; (e) either you, as an individual or an entity, or your wallet address is listed on the Specially Designated Nationals and Blocked Persons List (“SDN List”), Consolidated Sanctions List (“Non-SDN Lists), or any other sanctions lists administered by OFAC; (f) you are located, organized, or resident in a country or territory that is, or whose government is, the subject of sanctions, including but not limited to Côte d’Ivoire, Cuba, Belarus, Iran, Iraq, Liberia, North Korea, Sudan, and Syria; or (g) you have otherwise acted in violation of these Terms. If we have a reasonable suspicion that you are utilizing the Services for illegal purposes, we reserve the right to take whatever action we deem appropriate. We do not guarantee the quality or accessibility of the Services. As a condition to accessing or using the Services, you acknowledge, understand, and agree that from time to time, the Services may be inaccessible or inoperable for any reason, including, but not limited to equipment malfunctions, periodic maintenance procedures or repairs, causes beyond our control or that we could not reasonably foresee, disruptions and temporary or permanent unavailability of underlying blockchain infrastructure or unavailability of third-party service providers or external partners for any reason. You acknowledge and agree that you will access and use the Services at your own risk. You should not engage in blockchain-based transactions unless it is suitable given your circumstances and financial resources. By using the Services, you represent that you have been, are, and will be solely responsible for conducting your own due diligence into the risks of a transaction and the underlying smart contracts and cryptoassets. 4.Taxes You are responsible for your taxes and duties. Users bear sole responsibility for paying any and all taxes, duties, and assessments now or hereafter claimed or imposed by any governmental authority associated with their use of the Services and/or payable as a result of using and/or exploiting any cryptoassets and interacting with smart contracts. Blockchain-based transactions are novel, and their tax treatment is uncertain. Ownership We grant you a license to use our Services. Contingent upon your ongoing compliance with the Agreement, we grant you a personal, worldwide, revocable, non-exclusive, and non-assignable license to use the software provided to you as part of our Services. The only purpose of this license is to allow you to use and enjoy the Services solely as permitted by these Terms. We own all rights in the Services. We own any and all right, title, and interest in and to the Services, including, without limitation, any and all copyrights in and to any content, code, data, or other materials that you may access or use on or through the Services. Except as expressly set forth herein, your use of or access to the Services does not grant you any ownership or other rights therein. We may use and share your feedback. Any comments, bug reports, ideas, or other feedback that you may provide about our Services, including suggestions about how we might improve our Services, are entirely voluntary. You agree that we are free to use or not use any feedback that we receive from you as we see fit, including copying and sharing such feedback with third parties, without any obligation to you. 6.Prohibited Content You may only use the Services if you comply with this Agreement (including, without limitation, these Terms), applicable third-party policies, and all applicable laws, rules, regulations, and related guidance. The following conduct is prohibited: * Using the Services for, or to promote or facilitate, illegal activity (including, without limitation, money laundering, financing terrorism, tax evasion, buying or selling illegal drugs, contraband, counterfeit goods, or illegal weapons) * Exploiting the Services for any unauthorized commercial purpose * Uploading or transmitting viruses, worms, Trojan horses, time bombs, cancel bots, spiders, malware, or any other type of malicious code that will or may be used in any way that will affect the functionality or operation of the Services * Attempting to or actually copying or making unauthorized use of all or any portion of the Services, including by attempting to reverse compile, reformatting or framing, disassemble, reverse engineer any part of the Services * Harvesting or otherwise collecting information from the Services for any unauthorized purpose * Using the Services under false or fraudulent pretenses or otherwise being deceitful * Interfering with other users’ access to or use of the Services * Interfering with or circumventing the security features of the Services or any third party’s systems, networks, or resources used in the provision of Services * Engaging in any attack, hack, denial-of-service attack, interference, or exploit of any smart contract in connection with the use of the Service (and operations performed by a user that are technically permitted by a smart contract may nevertheless be a violation of our Agreement, including these Terms, and the law) * Engaging in any anticompetitive behavior or other misconduct Violating our rules may result in our intervention. You agree and acknowledge that if you use the Services to engage in conduct prohibited by applicable law, we permanently reserve the right to completely or partially restrict or revoke your access to the Services, either completely or for a period of time, at our sole discretion. We reserve the right to amend, rectify, edit, or otherwise alter transaction data to remediate or mitigate any damage caused either to us or to any other person as a result of a user’s violation of this Agreement or applicable law. We reserve the right to investigate violations. We reserve the right to investigate and prosecute any suspected breaches of this Agreement, including the Terms. We may disclose any information as necessary to satisfy any law, regulation, legal process, or governmental request. 7\. Disclaimers and Limitations of Liability We make no representations or warranties. THE SERVICES ARE PROVIDED ON AN “AS IS” AND “AS AVAILABLE” BASIS. WE AND OUR PARENTS, SUBSIDIARIES, AFFILIATES, RELATED COMPANIES, OFFICERS, DIRECTORS, EMPLOYEES, AGENTS, REPRESENTATIVES, PARTNERS, AND LICENSORS (COLLECTIVELY, THE “SIZE COMPANIES INDEMNIFIED PARTIES”) MAKE NO GUARANTEES OF ANY KIND IN CONNECTION WITH THE SERVICES. TO THE MAXIMUM EXTENT PERMITTED UNDER APPLICABLE LAW, THE SIZE COMPANIES INDEMNIFIED PARTIES DISCLAIM ALL WARRANTIES AND CONDITIONS, WHETHER EXPRESS OR IMPLIED, OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT AND DISCLAIM ALL RESPONSIBILITY AND LIABILITY FOR: * THE SERVICES BEING ACCURATE, COMPLETE, CURRENT, RELIABLE, UNINTERRUPTED, TIMELY, SECURE, OR ERROR-FREE. INFORMATION (INCLUDING, WITHOUT LIMITATION, THE VALUE OR OUTCOME OF ANY TRANSACTION) AVAILABLE THROUGH THE SERVICE IS PROVIDED FOR GENERAL INFORMATION ONLY AND SHOULD NOT BE RELIED UPON OR USED AS THE SOLE BASIS FOR MAKING DECISIONS. ANY RELIANCE ON THE SERVICES IS AT YOUR OWN RISK. * INJURY OR DAMAGE RESULTING FROM THE SERVICES. FOR EXAMPLE, YOU EXPRESSLY ACKNOWLEDGE, UNDERSTAND, AND AGREE THAT THE SERVICES MAY CONTAIN AUDIO-VISUAL EFFECTS, STROBE LIGHTS, OR OTHER MATERIALS THAT MAY AFFECT YOUR PHYSICAL SENSES AND/OR PHYSICAL CONDITION. FURTHER, YOU EXPRESSLY ACKNOWLEDGE THAT THE SIZE COMPANIES INDEMNIFIED PARTIES ARE NOT RESPONSIBLE FOR LOSS OR DAMAGE CAUSED BY ANOTHER USER’S CONDUCT, UNAUTHORIZED ACTORS, OR ANY UNAUTHORIZED ACCESS TO OR USE OF THE SERVICES. * VIRUSES, WORMS, TROJAN HORSES, TIME BOMBS, CANCEL BOTS, SPIDERS, MALWARE, OR OTHER TYPE OF MALICIOUS CODE THAT MAY BE USED IN ANY WAY TO AFFECT THE FUNCTIONALITY OR OPERATION OF THE SERVICES. Limitation of Liability. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL ANY Size COMPANIES INDEMNIFIED PARTY BE LIABLE TO YOU FOR ANY LOSS, DAMAGE, OR INJURY OF ANY KIND INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, EXEMPLARY, CONSEQUENTIAL, OR PUNITIVE LOSSES OR DAMAGES, OR DAMAGES FOR SYSTEM FAILURE OR MALFUNCTION OR LOSS OF PROFITS, DATA, USE, BUSINESS OR GOOD-WILL OR OTHER INTANGIBLE LOSSES, ARISING OUT OF OR IN CONNECTION WITH: * THE SERVICES OR YOUR INABILITY TO USE OR ACCESS THE SERVICES * MISUSE OF THE SERVICES (INCLUDING WITHOUT LIMITATION, UNAUTHORIZED ACCESS OF THE SERVICES) * ANY USER CONDUCT ON THE SERVICES * TERMINATION, SUSPENSION OR RESTRICTION OF ACCESS TO ANY THE SERVICES IN ADDITION TO THE FOREGOING, NO SIZE COMPANIES INDEMNIFIED PARTY SHALL BE LIABLE FOR ANY DAMAGES CAUSED IN WHOLE OR IN PART BY: * USER ERROR, SUCH AS FORGOTTEN PASSWORDS OR INCORRECTLY CONSTRUCTED SMART CONTRACTS OR OTHER TRANSACTIONS * SERVER FAILURE OR DATA LOSS * THE MALFUNCTION, UNEXPECTED FUNCTION OR UNINTENDED FUNCTION OF THE BLOCKCHAIN, ANY COMPUTER OR CRYPTOASSET NETWORK (INCLUDING ANY WALLET PROVIDER), INCLUDING WITHOUT LIMITATION LOSSES ASSOCIATED WITH NETWORK FORKS, REPLAY ATTACKS, DOUBLE-SPEND ATTACKS, SYBIL ATTACKS, 51% ATTACKS, GOVERNANCE DISPUTES, MINING DIFFICULTY, CHANGES IN CRYPTOGRAPHY OR CONSENSUS RULES, HACKING, OR CYBERSECURITY BREACHES * ANY CHANGE IN VALUE OF ANY CRYPTOASSET * ANY CHANGE IN LAW, REGULATION, OR POLICY * EVENTS OF FORCE MAJEURE * ANY THIRD PARTY THIS LIMITATION OF LIABILITY IS INTENDED TO APPLY WITHOUT REGARD TO WHETHER OTHER PROVISIONS OF THESE TERMS HAVE BEEN BREACHED OR HAVE PROVEN INEFFECTIVE. THE LIMITATIONS SET FORTH IN THIS SECTION SHALL APPLY REGARDLESS OF THE FORM OF ACTION, WHETHER THE ASSERTED LIABILITY OR DAMAGES ARE BASED ON CONTRACT, INDEMNIFICATION, TORT, STRICT LIABILITY, STATUTE, OR ANY OTHER LEGAL OR EQUITABLE THEORY, AND WHETHER OR NOT THE SIZE COMPANIES INDEMNIFIED PARTIES HAVE BEEN INFORMED OF THE POSSIBILITY OF ANY SUCH DAMAGE. IN NO EVENT WILL THE SIZE COMPANIES INDEMNIFIED PARTIES’ CUMULATIVE LIABILITY TO YOU OR ANY OTHER USER, FROM ALL CAUSES OF ACTION AND ALL THEORIES OF LIABILITY EXCEED ONE THOUSAND U.S. DOLLARS (U.S. $1,000.00). UNDER NO CIRCUMSTANCES SHALL ANY SIZE COMPANIES INDEMNIFIED PARTY BE REQUIRED TO DELIVER TO YOU ANY VIRTUAL CURRENCY AS DAMAGES, MAKE SPECIFIC PERFORMANCE, OR ANY OTHER REMEDY. IF YOU WOULD BASE YOUR CALCULATIONS OF DAMAGES IN ANY WAY ON THE VALUE OF VIRTUAL CURRENCY, YOU AND WE AGREE THAT THE CALCULATION SHALL BE BASED ON THE LOWEST VALUE OF THE VIRTUAL CURRENCY DURING THE PERIOD BETWEEN THE ACCRUAL OF THE CLAIM AND THE AWARD OF DAMAGES. Some jurisdictions do not allow the exclusion or limitation of certain warranties and liabilities provided in this section; accordingly, some of the above limitations and disclaimers may not apply to you. To the extent applicable law does not permit Size Companies Indemnified Parties to disclaim certain warranties or limit certain liabilities, the extent of Size Companies Indemnified Parties’ liability and the scope of any such warranties will be as permitted under applicable law. 8\. Indemnification You agree to indemnify, defend, and hold harmless the Size Companies Indemnified Parties from any claim or demand, including reasonable attorneys’ fees, made by any third party due to or arising out of:(a)Your breach or alleged breach of the Agreement (including, without limitation, these Terms);(b)Anything you contribute to the Services;(c)Your misuse of the Services, or any smart contract and/or script related thereto(d)Your violation of any laws, rules, regulations, codes, statutes, ordinances, or orders of any governmental or quasi-governmental authorities;(e)Your violation of the rights of any third party, including any intellectual property right, publicity, confidentiality, property, or privacy right;(f)Your use of a third-party product, service, and/or website; or (g) any misrepresentation made by you. We reserve the right to assume, at your expense, the exclusive defense and control of any matter subject to indemnification by you. You agree to cooperate with our defense of any claim. You will not in any event settle any claim without our prior written consent. We reserve the right to assume, at your expense, the exclusive defense and control of any matter subject to indemnification by you. You agree to cooperate with our defense of any claim. You will not in any event settle any claim without our prior written consent. 9\. Arbitration Agreement and Waiver of Rights, Including Class Actions PLEASE READ THIS SECTION CAREFULLY: IT MAY SIGNIFICANTLY AFFECT YOUR LEGAL RIGHTS, INCLUDING YOUR RIGHT TO FILE A LAWSUIT IN COURT AND TO HAVE A JURY HEAR YOUR CLAIMS. IT CONTAINS PROCEDURES FOR MANDATORY BINDING ARBITRATION AND A CLASS ACTION WAIVER. Agreement to Attempt to Resolve Disputes Through Good Faith Negotiations Prior to commencing any legal proceeding against us of any kind, including an arbitration as set forth below, you and we agree that we will attempt to resolve any dispute, claim, or controversy between us arising out of or relating to the agreement or the Services (each, a “Dispute” and, collectively, “Disputes”) by engaging in good faith negotiations. Such good faith negotiations require, at a minimum, that the aggrieved party provide a written notice to the other party specifying the nature and details of the Dispute. The party receiving such notice shall have thirty (30) days to respond to the notice. Within sixty (60) days after the aggrieved party sent the initial notice, the parties shall meet and confer in good faith by videoconference, or by telephone, to try to resolve the Dispute. If the parties are unable to resolve the Dispute within ninety (90) days after the aggrieved party sent the initial notice, the parties may agree to mediate their Dispute, or either party may submit the Dispute to arbitration as set forth below. Agreement to Arbitrate You and we agree that any Dispute that cannot be resolved through the procedures set forth above will be resolved through binding arbitration in accordance with the International Arbitration Rules of the International Centre for Dispute Resolution. The place of arbitration shall be the British Virgin Islands. The language of the arbitration shall be English. The arbitrator(s) shall have experience adjudicating matters involving Internet technology, software applications, financial transactions and, ideally, blockchain technology. The arbitrator’s award of damages must be consistent with the terms of the “Limitation of Liability” subsection of these Terms as to the types and amounts of damages for which a party may be held liable. The prevailing party will be entitled to an award of their reasonable attorney’s fees and costs. Except as may be required by law, neither a party nor its representatives may disclose the existence, content, or results of any arbitration hereunder without the prior written consent of (all/both) parties. UNLESS YOU TIMELY PROVIDE US WITH AN ARBITRATION OPT-OUT NOTICE (AS DEFINED BELOW IN THE SUBSECTION TITLED “YOUR CHOICES”), YOU ACKNOWLEDGE AND AGREE THAT YOU AND WE ARE EACH WAIVING THE RIGHT TO A TRIAL BY JURY OR TO PARTICIPATE AS A PLAINTIFF OR CLASS MEMBER IN ANY PURPORTED CLASS ACTION OR REPRESENTATIVE PROCEEDING. FURTHER, UNLESS BOTH YOU AND WE OTHERWISE AGREE IN WRITING, THE ARBITRATOR MAY NOT CONSOLIDATE MORE THAN ONE PERSON’S CLAIMS AND MAY NOT OTHERWISE PRESIDE OVER ANY FORM OF ANY CLASS OR REPRESENTATIVE PROCEEDING. Changes By rejecting any changes to these Terms, you agree that you will arbitrate any Dispute between you and us in accordance with the provisions of this section as of the date you first accepted these Terms (or accepted any subsequent changes to these Terms). 10\. Waiver of Injunctive or Other Equitable Relief TO THE MAXIMUM EXTENT PERMITTED BY LAW, YOU AGREE THAT YOU WILL NOT BE PERMITTED TO OBTAIN AN INJUNCTION OR OTHER EQUITABLE RELIEF OF ANY KIND, SUCH AS ANY COURT OR OTHER ACTION THAT MAY INTERFERE WITH OR PREVENT THE DEVELOPMENT OR EXPLOITATION OF THE SERVICES, OR ANY OTHER WEBSITE, APPLICATION, CONTENT, SUBMISSION, PRODUCT, SERVICE, OR INTELLECTUAL PROPERTY OWNED, LICENSED, USED OR CONTROLLED BY ANY SIZE COMPANIES INDEMNIFIED PARTY. 11\. Termination; Cancellation This Agreement is effective unless and until terminated by either you or us. You may terminate your Agreement with us at any time by ceasing all access to the Services. If, in our sole judgment, you fail, or we suspect that you have failed, to comply with any term or provision of the Agreement (including without limitation any provision of these Terms), we reserve the right to terminate our Agreement with you and deny you access to the Services. We further reserve the right to restrict your access to the Services or to stop providing you with all or a part of the Services at any time and for no reason, including, without limitation, if we reasonably believe: (a) your use of the Services exposes us to risk or liability; (b) you are using the Services for unlawful purposes; or (c) it is not commercially viable to continue providing you with our Services. All of these are in addition to any other rights and remedies that may be available to us, whether in equity or at law, all of which we expressly reserve. WE RESERVE THE RIGHT TO MODIFY THE SERVICES AT ANY TIME, BUT WE HAVE NO OBLIGATION TO UPDATE THE SERVICES. YOU AGREE THAT IT IS YOUR RESPONSIBILITY TO MONITOR CHANGES TO THE SERVICES THAT MAY AFFECT YOU. YOU AGREE THAT WE MAY REMOVE THE SERVICES AND/OR ANY CONTENT THEREON FOR INDEFINITE PERIODS OF TIME OR CANCEL THE SERVICES AT ANY TIME, WITHOUT NOTICE TO YOU. 12\. Severability If any provision of the Agreement (including, without limitation, these Terms) is determined to be unlawful, void, or unenforceable, such provision shall nonetheless be enforceable to the fullest extent permitted by applicable law, and the unenforceable portion shall be deemed to be severed from the Agreement. Such determination shall not affect the validity and enforceability of any other remaining provisions. 13\. Assignment The Agreement (including, without limitation, these Terms) may be assigned without your prior consent to any Size Companies Indemnified Party, or to its successors in the interest of any business associated with the Services provided by us. You may not assign or transfer any rights or obligations under the Agreement without our prior written consent. 14\. Entire Agreement The Agreement (including, without limitation, these Terms, and the Privacy Policy) and any policies or operating rules posted by us on the Services constitute the entire agreement and understanding between you and us and govern your use of the Services, superseding any prior or contemporaneous agreements, communications, and proposals, whether oral or written, between you and us (including, but not limited to, any prior versions of these Terms). Any failure by us to exercise or enforce any right or provision of the Agreement (including, without limitation, these Terms) shall not constitute a waiver of such right or provision. 15\. Governing Law These Terms and any separate agreements whereby we provide you Services shall be governed by and construed in accordance with the laws of the British Virgin Islands. 16\. Contact Us You may contact us with questions about your use of the Services at [\[email protected\]](https://docs.size.credit/cdn-cgi/l/email-protection) . [PreviousOfficial Links](https://docs.size.credit/official-links/official-links) [NextPrivacy Policy](https://docs.size.credit/terms-of-use/privacy-policy) Last updated 6 months ago --- # Privacy Policy | Size Credit Docs Effective Date: 08 Jan 2025 The Size Protocol operates in a decentralized and permissionless manner. Although we may collect and process information about users of Size.credit, app.size.credit, or the Interface in accordance with this Privacy Policy, we do not have information about all protocol users beyond what is already publicly available and recorded on the blockchain. This Privacy Policy (the "Privacy Policy") explains how the Size Companies ("we," "our," or "us") collects, uses, and shares information in connection with our Services as well as your rights and choices regarding such information. These terms apply to Size.credit and the Interface and any other online location that links to this Privacy Policy (collectively, the "Services"). By using the Services, you also agree to our collection, use, and sharing of your information as described in this Privacy Policy. If you do not agree with the Terms of Use, you should not use or access the Interface or the Services. 1\. Information Collection A. Information You Provide. We may collect the following information about you when you use the Services: * Correspondence and Content, Within any messages you send to us (such as feedback and questions to information support), we may collect your name and contact information, as well as any other content included in the message. You may choose to voluntarily provide other information to us that we have not solicited from you, and, in such instances, you are solely responsible for such information. B. Information Collected Automatically. We collect the following information: * Wallet Address. We may collect the wallet address you use to connect to the Interface to block wallets that are associated with certain legally prohibited conduct from Interface. Separately, we may collect your wallet address as part of "Usage Information" (as described below) to improve the Interface and user experience of the Services. * Device Information. We may collect information about the device you use to access the Interface, such as the device type, operating system, browser type, and screen height and width. This information helps us optimize the Interface for different devices and troubleshoot any technical issues. * Usage Information. We may collect information about how you use the Interface and Services, including your wallet address, the time you access the Interface, pages you visit, the features and assets you interact with, the links you click, and the search queries you make. By analyzing this data, we gain a deeper understanding of user behavior, which in turn allows us to make continuous improvements to the Interface and enhance the overall user experience. For further information on how we use tracking technologies for analytics and your rights and choices regarding them, please see the "Cookies Policy" and "Analytics" sections below. 2\. Use of Information We may collect and use information for business purposes in accordance with the practices described in this Privacy Policy. Our business purposes for collecting and using information include: * Operating and managing the Services (including through authorized service providers). To make the Services available to you and perform services requested by you, such as responding to your comments, questions, and requests, and providing information support; sending you technical notices, updates, security alerts, information regarding changes to our policies, and support, administrative messages; detecting, preventing, and addressing fraud, breach of Terms, and threats, or harm; and compliance with legal and regulatory requirements. * Improving the Services. To continually improve the Services and fulfill any other legitimate business purpose, as permitted under applicable laws. * Merger or Acquisition. In connection with, or during negotiations of, any proposed or actual merger, purchase, sale, or any other type of acquisition, financing, reorganization, or business combination of all or any portion of our assets, or transfer of all or a portion of our business to another business. * Security and Compliance with Laws. As we believe necessary or appropriate to operate and maintain the security or integrity of the Interface, including to prevent or stop an attack on our computer systems or networks, investigate possible wrongdoing in connection with the Interface, enforce our Terms, and comply with applicable laws, lawful requests, and legal process, such as responding to subpoenas or requests from government authorities. * Facilitating Requests. To comply with your requests or directions. * Consent. Purposes for which we have obtained your consent, as required by applicable laws. Notwithstanding the above, we may use information that does not identify you (including information that has been aggregated or de-identified) for any purpose except as prohibited by applicable law. For information on your rights and choices with respect to how we use information about you, please see the "Analytics" section below. 3\. Sharing and Disclosure of Information We may share or disclose information that we collect in accordance with the practices described in this Privacy Policy and for the purposes set out in the "Use of Information" section above. The categories of parties with whom we may share information include: * Affiliates. We share information with our affiliates and related entities, including where they act as our service providers or for their own internal purposes. * Professional Advisors We share information with our professional advisors for purposes of audits and compliance with our legal obligations. * Service Providers. We share information with third-party service providers for business purposes, including fraud detection and prevention, security threat detection, data analytics, information technology and storage, and blockchain transaction monitoring. Any information shared with such service providers is subject to the terms of this Privacy Policy. All service providers that we engage with are restricted to only utilizing the information on our behalf and in accordance with our instructions. Notwithstanding the above, we may share information that does not identify you (including information that has been aggregated or de-identified) except as prohibited by applicable law. 4\. Third-Party Services We may also integrate technologies operated or controlled by other parties into parts of the Services. For example, the Services may include links that hyperlink to websites, platforms, and other services not operated or controlled by us. Please note that when you interact with other parties, including when you leave the Interface, those parties may independently collect information about you and solicit information from you. The information collected and stored by those parties remains subject to their own policies and practices, including what information they share with us, your rights and choices on their services and devices, and whether they store information in the U.S. or elsewhere. We encourage you to familiarize yourself with and consult their privacy policies and terms of use. For example, by using a third-party wallet to engage in transactions on public blockchains, your interactions with any third-party wallet provider are governed by the applicable terms of service and privacy policy of that wallet provider. 5\. Cookies Policy We understand that your privacy is important to you and are committed to being transparent about the technologies we use. In the spirit of transparency, this Cookies Policy provides detailed information about how and when we use cookies on our Services. A. Do we use cookies? We do not use cookies. If we were, we would use cookies and other technologies to understand how you use our Interface so we can improve its design and functionality (to ensure everyone who uses the Interface has the best possible experience) What is a cookie? A cookie is a small text file that is placed on your hard drive by a web page server. Cookies contain information that can later be read by a web server in the domain that issued the cookie to you. Some of the cookies will only be used if you use certain features or select certain preferences, and some cookies will always be used. You can find out more about each cookie by viewing our current cookie list below. We update this list periodically, so there may be additional cookies that are not yet listed. B. Why would we use cookies? We use cookies and other similar identifiers only to compile aggregate data about Interface traffic and site interaction to offer better user experiences and tools in the future. C. What types of cookies do we use? * Strictly Necessary Cookies: These cookies are essential for the Interface to function properly and enable basic features such as page navigation and access to secure areas of the site. They do not collect personal information. * Analytical/Performance Cookies: These cookies allow us to analyze how visitors use the Interface, which helps us improve its functionality and performance. * Functional Cookies: These cookies enable enhanced functionality and personalization of the website. They may remember your preferences, such as the wallet you previously used to connect. D. How to disable cookies? Users can generally activate or later deactivate the use of cookies through a functionality built into your web browser. If you want to learn more about cookies, or how to control, disable, or delete them, please visit [http://www.aboutcookies.org](http://www.aboutcookies.org/) for detailed guidance. 6\. Analytics We may use Google Analytics and/or other light analytics software. 7\. Data Security We implement and maintain reasonable administrative, physical, and technical security safeguards to help protect information about you from loss, theft, misuse, unauthorized access, disclosure, alteration, and destruction. Nevertheless, transmission via the Internet is not completely secure and we cannot guarantee the security of information about you. 8\. Data Retention Please note that we retain information we collect as long as it is necessary to fulfill the purpose for which it was collected, as outlined in this Privacy Policy, and to the extent permitted by applicable legal requirements. Where you request the deletion of your information, we may continue to retain and use your information as permitted or required under applicable laws, for legal, tax, or regulatory reasons, or legitimate and lawful business purposes. 9\. International Transfers Please be aware that information collected through the Services may be transferred to, processed, stored, and used in the European Economic Area, the United Kingdom, and other jurisdictions. Data protection laws in the EU and other jurisdictions may be different from those of your country of residence. Your use of the Services or provision of any information therefore constitutes your consent to the transfer to and from, processing, usage, sharing, and storage of information about you in the EU and other jurisdictions as set out in this Privacy Policy. 10\. Children The Services are intended for general audiences and are not directed at children. To use the Services, you must legally be able to enter into the Agreement. We do not knowingly collect personal information (as defined by the U.S. Children's Privacy Protection Act, or "COPPA") from children. If you are a parent or guardian and believe we have collected personal information in violation of COPPA, please contact us at [\[email protected\]](https://docs.size.credit/cdn-cgi/l/email-protection) and we will remove the personal information in accordance with COPPA. 11\. Additional Disclosures for California Residents These additional disclosures apply only to California residents. The California Consumer Privacy Act of 2018 ("CCPA") provides additional rights to know, delete, and opt-out, and requires businesses collecting or disclosing personal information to provide notices and the means to exercise consumer rights. A. Notice of Collection For further details on the information we may collect, including the sources from which we receive information, review the "Information Collection" section above. We may collect and use these categories of personal information for the business purposes described in the "Use of Information" section above, including to manage the Services. We do not "sell" personal information as defined under the CCPA. Please review the "Sharing and Disclosure of Information" section above for further details about the categories of parties with whom we share information. B. Right to Know and Delete You have the right to know certain details about our data practices within the past twelve (12) months. In particular, you may request the following from us: * The categories of personal information we have collected about you; * The categories of sources from which the personal information was collected; * The categories of personal information about you we disclosed for a business purpose; * The categories of third parties to whom the personal information was disclosed for a business purpose; * The business or commercial purpose for collecting or selling the personal information; and * The specific pieces of personal information we have collected about you. In addition, you have the right to delete the personal information we have collected from you. To exercise any of these rights, please submit a request by emailing us at [\[email protected\]](https://docs.size.credit/cdn-cgi/l/email-protection) . In the request, please specify which right you are seeking to exercise and the scope of the request. We will confirm receipt of your request within ten (10) days. We may require specific information from you to help us verify your identity and process your request. If we are unable to verify your identity, we may deny your requests to know or delete. C. Authorized Agent You may designate an authorized agent to submit requests on your behalf; however, we may require written proof of the agent's permission to act on your behalf and verify your identity directly. D. Right of Non-Discrimination You have a right of non-discrimination for the exercise of any of your privacy rights guaranteed by law, such as the right to access, delete, or opt-out of the sale of your personal information. E. Shine the Light Customers who are residents of California may request (i) a list of the categories of personal information disclosed by us to third parties during the immediately preceding calendar year for those third parties' own direct marketing purposes; and (ii) a list of the categories of third parties to whom we disclosed such information. To exercise a request, please write to us at the email or postal address set out in the "Contact Us" section above and specify that you are making a "California Shine the Light Request." We may require additional information from you to allow us to verify your identity and are only required to respond to requests once per calendar year. 12\. Additional Disclosures for Data Subjects in the European Economic Area and the United Kingdom A. Roles The General Data Protection Regulations in the European Economic Area and General Data Protection Regulations in the United Kingdom ("GDPR") distinguish between organizations that process personal data for their own purposes (known as "controllers") and organizations that process personal data on behalf of other organizations (known as "processors"). We act as a controller with respect to personal data collected as you interact with the Services. B. Lawful Basis for Processing The GDPR requires a "lawful basis" for processing personal data. Our lawful bases include where:(i) Consent: You have given consent to the processing of your personal data for one or more specific purposes, either to us or to our service providers or partners.(ii) Contractual Necessity: Processing your personal data is necessary for the performance of a contract between you and us.(iii) Legal Obligation: Processing your personal data is necessary for compliance with a legal obligation.(iv) Legitimate Interests: Processing your personal data is necessary for the purposes of the legitimate interests pursued by us or a third party, provided that your interests and fundamental rights and freedoms do not override those interests.Where applicable, we will transfer your personal data to third parties subject to appropriate or suitable safeguards, such as standard contractual clauses. Purpose Legal Basis Operating and managing the Services Necessary for the performance of our agreement To communicate with you Necessary for the performance of our agreement Improving the Services Legitimate interests, Consent To provide our Services Legitimate interests, Consent Merger or Acquisition Legitimate interests, legal obligation (when communicating with EEA, U.K., and Swiss regulatory bodies) Security and compliance with laws Legal obligation, legitimate interests, necessary for the performance of our agreement Other purposes for which we have obtained your consent Consent C. Your Data Subject Rights If you are a user in the European Economic Area or the United Kingdom, you maintain certain rights under the GDPR. These rights include the right to:(i)request access and obtain a copy of your personal data;(ii) request rectification or erasure of your personal data;(iii) object to or restrict the processing of your personal data;(iv)request portability of your personal data.Additionally, if we have collected and processed your personal data with your consent, you have the right to withdraw your consent at any time. Notwithstanding the foregoing, we cannot edit or delete information that is stored on a particular blockchain. This information may include transaction data (i.e., purchases, sales, and transfers) related to your blockchain wallet address and any items held by your wallet address. To exercise any of these rights, please contact us via our email or postal address listed in the "Contact Us" section above and specify which right you are seeking to exercise. We will respond to your request within thirty (30) days. We may require specific information from you to help us confirm your identity and process your request. Please note that we retain information as necessary to fulfill the purpose for which it was collected and may continue to retain and use information even after a data subject request in accordance with our legitimate interests, including as necessary to comply with our legal obligations, resolve disputes, prevent fraud, and enforce our agreements. If you have any issues with our compliance, please contact us as set out in the "Contact Us" section above. You also reserve the right to lodge a complaint with the data protection regulator in your jurisdiction. 13\. Changes to this Privacy Policy We reserve the right to revise and reissue this Privacy Policy at any time. Any changes will be effective immediately upon our posting of the revised Privacy Policy. For the avoidance of doubt, your continued use of the Services indicates your consent to the revised Privacy Policy then posted. 14\. Contact Us If you have any questions or comments about this Privacy Policy, our data practices, or our compliance with applicable law, please contact us by email: [\[email protected\]](https://docs.size.credit/cdn-cgi/l/email-protection) . [PreviousTerms of Use](https://docs.size.credit/terms-of-use/terms-of-use) [NextMedia Kit](https://docs.size.credit/terms-of-use/media-kit) Last updated 6 months ago --- # 1.2 Limit Orders | Size Credit Docs There are 2 types of limit orders * Lending Limit Orders (credit buy limit orders), representing an intent to lend money, in a certain time range and a certain rates range * Borrowing Limit Orders (credit sell limit orders), representing an intent to borrow money, in a certain time range and a certain rate range In terms of liquidity * Lending Limit Orders are associated with an amount of token that can be lent out, USDC in this case and * Borrowing Limit Orders are associated with the borrower's collateral, to back the loan if the order is matched The collateral backing a loan is automatically calculated and assigned pro rata so there is no direct collateral to loan assignment or collateralized debt position. [](https://docs.size.credit/how-it-works/technical-docs/1.2-limit-orders#id-1.2.1-limit-order-structure-yield-curve) 1.2.1 Limit Order Structure - Yield Curve ------------------------------------------------------------------------------------------------------------------------------------------------------------------- Makers place limit orders by specifying a yield curve ρ(t):R→R+\\rho(t) : \\mathbb{R} \\rightarrow \\mathbb{R}^{+}ρ(t):R→R+ which is a curve that associates with each term a non-negative rate The yield curve consists of a set of (ti,ri)i\=1,...,n{(t\_{i}, r\_{i})}\_{i=1,...,n}(ti​,ri​)i\=1,...,n​ points specified by the lender-associated * to a given tit\_{i}ti​ term * a certain ri∈Rr\_{i} \\in \\mathbb{R}ri​∈R rate (they can be negative because of the price hooks explained later) This effectively defines a piece-wise function in the (t0,tn−1)(t\_{0}, t\_{n-1})(t0​,tn−1​) temporal range on-chain and the taker submitting a market order can pick any t∈(t0,tn−1)t \\in (t\_{0}, t\_{n-1})t∈(t0​,tn−1​) and the result is computed by interpolating linearly. [](https://docs.size.credit/how-it-works/technical-docs/1.2-limit-orders#id-1.2.2-filling-limit-orders) 1.2.2 Filling limit orders --------------------------------------------------------------------------------------------------------------------------------------- ### [](https://docs.size.credit/how-it-works/technical-docs/1.2-limit-orders#id-1.2.2.1-filling-lending-limit-orders-credit-buy-limit-orders) **1.2.2.1 Filling** Lending Limit Orders **(credit buy limit orders)** In filling a Lending Limit Order, the lender expects * some cash gets out of his account, since it is sent to the borrower and * to acquire some credit in exchange This mechanism can be used for 2 purposes * standard lending and * selling existing credit In fact, if the borrower is also a lender, he can use this mechanism to sell some of his credit to another lender in exchange for some cash. This leads to a broader and more general terminology where * the lender is a "credit buyer" and * the borrower is a "credit seller" as he can sell both * a new credit he emits in the form of overcollateralized debt and * a credit he already owns, since he can also be a lender The pricing of the credit is implicitly present in the Lending Limit Order as the rate associated with the due date chosen by the borrower, aka credit seller. The way a Lending Limit Order is filled is 1. the credit seller/buyer chooses: * an amount AAA to borrow * a lender LLL and * a tenor ΔT\\Delta TΔT This allows to compute the corresponding rate to that lender yield curve as follows r\=ρL(ΔT)r = \\rho\_{L}(\\Delta T)r\=ρL​(ΔT) Of course, it is required that ΔT∈(t0,tn−1)\\Delta T \\in (t\_{0}, t\_{n-1})ΔT∈(t0​,tn−1​) since outside of that interval, the lender does not want to lend. **Observation:** in the current implementation, the rate is not a function of the amount borrowed so there is no "slippage" in borrowing from a single lender, although there can be "slippage" if a large amount is borrowed since it would require borrowing from multiple lenders at different rates. This is exactly what happens in a standard 2D order book when a large order consumes the liquidity of a bucket and the buckets at different prices close the initial one. 1. the borrower emits a bond in favor of the lender for V\=A(1+r)V = A (1 + r)V\=A(1+r) face value that matures at TTT time 2. the amount AAA is withdrawn from the Lender L reserves and sent to the borrower 3. finally, before finalizing the operation, a collateral check is performed to check that the borrower's collateral ratio is above the opening threshold ### [](https://docs.size.credit/how-it-works/technical-docs/1.2-limit-orders#id-1.2.2.2-filling-borrowing-limit-orders) **1.2.2.2 Filling Borrowing Limit Orders** The filling of Borrowing Limit Orders is symmetric to the filling of Lending Limit Orders. [Previous1.1 Fixed-Rate Order Book (FROB)](https://docs.size.credit/how-it-works/technical-docs/1.1-fixed-rate-order-book-frob) [Next2\. Accounting System](https://docs.size.credit/how-it-works/technical-docs/2.-accounting-system) Last updated 2 months ago --- # 4. FAQ | Size Credit Docs Q: Can you share the code walkthrough URL? A: [Here](https://youtu.be/BNGkWUUG2fg?si=1y32_HrMOPLsSejD) * * * Q: I am having issues building the project A: Try our [Dockerfile](https://gist.github.com/aviggiano/831ed25a7fa4b67bb6944439db4f9ff6) * * * Q: Can you explain what's `RESERVED_ID`? And how it's used? A: As explained in the docs of ISize.sol and [3.3. Market Orders](https://docs.size.credit/how-it-works/technical-docs/3.3-market-orders) , some operations (buy credit, sell credit, compensate), expect a credit position ID as an input parameter so that you can buy an existing credit (from a lender), sell an existing credit (to a credit buyer), or compensate your debt from another loan you have. The special ID of `RESERVED_ID = type(uint256).max` can also be passed to represent "create a credit/debt pair" and execute the buying/selling/compensation operation at the same time. This is used for example to do a simple lend with `buyCreditMarket(RESERVED_ID)`, do a simple borrow with `sellCreditMarket(RESERVED_ID)` or partially repay a loan with `compensate(RESERVED_ID)` + `repay` * * * Q: What does N/A mean in the context of input validation functions? A: Not Applicable. The code has N/A comments for documentation purposes of fields that in reality do not need input validation. For example, in `validateClaim`, there's a `N/A` for `msg.sender`, since claim can be performed by anyone, as it is a permissionless method. * * * Q: Can you summarize credit limit and credit market in simple words ? A: * limit = limit order (maker) * market = market order (taker) * buy credit = lend * sell credit = borrow * sellCreditMarket (market borrow) fills a buyCreditLimit order * buyCreditMarket (market lend) fills a sellCreditLimit order, or buys an existing credit depending on the params passed * * * Q: Regarding the Claim functionality. The lender does not necessarily have to call claim function immediately and therefore can earn additional yield from Aave. However, anyone can claim on behalf of someone else, and the protocol has its own bots to claim for other lenders. What happens if I as a lender want to leave the debt repayment (not claim it) and earn yield from Aave but someone else / bot claims it for me? Is there any minimum or maximum time that I can leave my repayment unclaimed? A: What happens is that nothing changes from the lender perspective. The reason is that `claim` will only do an internal balance change from `address(this)` to `creditPosition.lender`, but since all USDC is already deposited on Aave (through `deposit` / `DepositTokenLibrary` / `NonTransferrableScaledToken`), all user's borrow tokens/cash already automatically earn variable interest by default. Let's say there are two situations: Situation I 1. repay 2. claim 3. pass time 4. withdraw Situation II 1. repay 2. pass time 3. claim 4. withdraw Both Situation I and Situation II will have the same output for the lender, since in Situation I, the time passage will directly credit `borrowAToken.balanceOf(lender)`, while in Situation II, it will credit `borrowAToken.balanceOf(address(this))`, but in the end, the credit amount will be proportionally sent to the lender's account during the claim step. You can refer to the following test case to see it in more detail: `test_Claim_claim_at_different_times_may_have_different_interest` Q: Is there any minimum or maximum time that I can leave my repayment unclaimed A: No * * * Q: When a borrower corresponding to a particular lender is susceptible to liquidation, is `liquidate`/`liquidateWithReplacement` being called by the protocol automatically to provide the lender with a healthy borrower or the lender needs to call the function themselves? A: The liquidate function is not permissioned and can be called by anyone to liquidate an unhealthy position. The liquidateWithReplacement function is permissioned by the `KEEPER_ROLE`, and can only be called by Size. The protocol will employ bots to call `liquidate`/`liquidateWithReplacement` to stop bad debt from accruing within the protocol, but if these bots should fail for any reason, a lender or external liquidate can always call liquidate and make the lender whole, earning some incentive in the process. Second, it is worth pointing out that "When a borrower corresponding to a particular lender" is not a completely accurate description of the most generic case of the protocol. The reason is that 1 credit seller (borrower) can have multiple credit buyers (lenders) in case the credit buyer resells part of their future cash flow (partial lender exit). For example, if a borrower picks a lender with `sellCreditMarket(RESERVED_ID)`, then the lender can exit with `sellCreditMarket(creditPositionId)`, and now the initial borrower may have 2 lenders. Check out the test case `test_SellCreditMarket_sellCreditMarket_CreditPosition_credit_is_decreased_after_exit` and documentation entry [2.2.2.2. Credit Position](https://docs.size.credit/how-it-works/technical-docs/2.2-loans#id-2.2.2.2-creditposition) . Third, the purpose of `liquidateWithReplacement` is for the protocol to earn some additional cash when an underwater borrower can be replaced by a healthy borrower on the orderbook who might be willing to pay a higher rate than the original borrower. For example, suppose the initial borrower was paying 1% yearly. Some time passes, and they are now liquidatable. Due to different market conditions, the new borrow rates are up, and there are borrowers willing to pay 2% yearly. Because of this spread, the protocol can replace the underwater borrower with a new healthy borrower and keep the change. The situation for the lenders does not change anything, except that now they are to be repaid by a healthier borrower. * * * Q: If mechanisms are already present to prevent the borrower from delaying the repayment of the loan, then how does the borrower become under-collateralized/ susceptible to liquidation? A: There are no mechanisms to change the term of a loan. They all must be repaid by the due date. What happens if the borrower does not repay is that the loan becomes overdue and it can be liquidated. The borrower becomes under-collateralized by either withdrawing collateral or by a collateral price change. More information about that [here](https://docs.size.credit/how-it-works/technical-docs/3.5-liquidations#id-3.5.1-automatic-collateral-assignment) . In a sense, liquidate/liquidateWithReplacement "prevent" the borrower from delaying the payment. More strictly, though, the liquidator will repay the loan on behalf of the borrower (so that the lenders can have their money back), and take the borrower's collateral (plus incentives) for not repaying by the due date. * * * Q: What is the purpose of `multicall` and `isMulticall` ? A: Basically, `multicall` allows a user to submit multiple actions in a single transaction. This can be useful for liquidations, for example, where the liquidator calls deposit, then liquidate, then withdraw. Check out `IMulticall.sol` for more details, and also test case `test_Multicall_liquidator_can_liquidate_and_withdraw` The purpose of `isMulticall` is a flag to check if postcondition checks should be waived during a multicall operation. This is especially useful for `deposit`, so that a debt reduction operation can always succeed, no matter if the cap is reached or not. There are some docs about that on `Deposit.sol` * * * Q: Can you provide a simple example(no fees) with `buyCreditMarket`, splitted on different stages by showing Alice, Bob and Carl's funds, credits, dept etc. And how are they connected if Alice is the borrower and Bob & Carl are the lenders? A: For the sake of simplicity, assume no fees: 1. Alice deposits collateral and submits a `sellCreditLimit` specifying she wants to borrow at 20% yearly 2. Bob deposits cash and picks Alice's offer with `buyCreditMarket(alice, RESERVED_ID)`, lending $100 to Alice. Alice now owns a debt position `debtPositionId1` of $120 future value due 365 days from now, and her `debtToken` is incremented by the same amount, reducing her collateral ratio. Bob owns a credit position `creditPositionId1` of $120, with the `debtPositionId` parameter pointing to Alice's debt position `debtPositionId1`. This link is done in `AccountingLibrary.createDebtAndCreditPositions` 3. Bob now wants to sell his credit and submits a `sellCreditLimit` specifying that he wants to earn 25% yearly. 4. Carl wants to buy $30 worth of Bob's credit, and submits a `buyCreditMarket(_, creditPositionId1)`. Bob's credit is brought to present value at a 25% rate, and Carl needs to pay $30/1.25 = $24 in cash for a part of Bob's credit. Bob's credit is fractionalized in `AccountingLibrary.createCreditPosition`, and now Bob's credit position is reduced to $90 = $120-$30, and Carl owns a credit `creditPositionId2` worth $30. 5. After all these operations, both credit positions `creditPositionId1` and `creditPositionId2` have the same `debtPositionId` parameter equal to `debtPositionId1`, ie, referring to Alice, the initial borrower. 6. When Alice `repay`s, her $120 future value is deposited to the protocol. Then, both Bob and Carl (or anyone, since it is a permissionless method) can call `claim` passing each of their respective credit position IDs. This will transfer cash from the protocol to the respective creditor. This way, Bob will get $90 in cash to his balance and Carl will get $30. You can see a similar test case in `test_SellCreditMarket_sellCreditMarket_exit_properties`, but with different values and checks. This example already shows some particularities of the Size protocol: * In (1), Alice submits a `sellCreditLimit` wanting to borrow money. In (3), Bob too submits a `sellCreditLimit` wanting to exit part of his loan. So the same operation can be either used for a "simple borrow" or for a "loan exit". As the docs explains quite well, in both cases users are selling credit (aka future cash flow). So this may be future cash flow in the sense of a borrow or future cash flow that they are receiving from someone else (lender exiting) * In (4), during the credit fractionalization, a critical invariant of the protocol must hold, which is that `SUM(credit) = futureValue`. As we have explained, there can be multiple creditors for the same loan, but if this sum is not exact, the protocol would be either printing money (ie, sum of amount to be received greater than amount to be repaid, if `>`) or not giving back to creditors at the due date (ie, sum of amount to be received lesser than the amount to be repaid, if `<`) * In (4), as you may see in the code, the `borrower` parameter is not used. This is a bit confusing, but the reason is that you are buying an existing credit, so the actual storage value you should be looking at is `creditPosition.lender`. This was an API choice so that both "buy an existing credit" and "create & buy and existing credit" actions would happen at the same function. You can see that in `BuyCreditMarket.executeBuyCreditMarket` * * * Q: What is the significance of the borrow token cap? It seems this cap is not really used anywhere except for a few functions that check if it hasn't been breached A: The reason for the borrow token cap is to allow the protocol to have a "guarded launch", so that it can limit the supply as it grows. For example, in the beginning, while the TVL grows, the cap may be $1M in deposits, for example. However, as you may see, the protocol will still want to allow for debt reductions. So even if the cap is reached, all operations that increase the health of the system should be allowed (`CapLibrary.sol`). Projects may choose to do it for a number reasons. For example, to prevent growing at a faster pace than its security/safety/trust, perhaps to prevent growing before a bug bounty program is in place, etc. * * * Q: Can users deposit/withdraw ETH? A: Users can deposit ETH/WETH for collateral and USDC for borrow tokens but only withdraw WETH and USDC * * * Q: What is the difference between credit and debt position? A: Opposites. Owner of a debt pays back the owner of the corresponding credit at maturity. Credit = future cashflow If you (market) borrow / sell credit, you have a debt position. If you (market) lend / buy credit, you have a credit. * * * Q: Why is the update of the swap fee and minimum/maximum tenor related? A: The reason is that it is multiplied by the loan duration to calculate the exact fee amount. The absolute swap fee amount is `cash * swapFeeAPR * duration` (decimals in percentage points) So for example: If you borrow $100 due 73 days, you will pay $100 \* 0.5 \* 73 / 365 = $10 in fees The ending result is $100 - $10 = $90 So basically for the fee to not "eat up" the whole cash (since amountOut = amount \* (1 - swapFeeAPR \* duration), you need the fee times the duration to be at most 100% (otherwise, fees eat up the whole amount of cash), so `swapFeeAPR * duration <= 1` Because of that, you have: * Copy max swapFeeAPR = 1 / duration Same for max duration * Copy max duration = 1 / swapFeeAPR Take a look at the [preconditions here](https://docs.size.credit/how-it-works/technical-docs/3.3-market-orders) . * * * Q: Why can't `crLiquidation` be increased by the admin? A: The reason is that the admin shouldn't increase the CR liquidation or that could make borrowers instantly liquidatable. For example, suppose a borrower has $140 worth of collateral and $100 worth of debt. His CR is 140%, and he is healthy, since `crLiquidation` is initially set to 130%. But if the admin changes it to 150%, the borrower is now instantly liquidatable. So this check is a protection against a misconfiguration by the admin * * * Q: Are exiting lenders forced to have a borrow offer then? A: Yes, they are if they want to passively have their credits bought (as you are doing with BuyCreditMarket). If lenders want to exit actively, with SellCreditMarket, then they don't need a borrow offer. The reason is that the borrow offer is a somewhat simplistic name because it both means "amount of interest I am willing to pay to borrow money" (from a borrower's point of view) and also "amount of interest I am willing to get to sell my credit" (from a credit seller point of view, which can be a lender). We thought about renaming BorrowOffer to CreditSellOffer, or something like that so that it would be more generic, but we've decided to keep it aligned with the borrower/lending perspective so that it could be easier to interpret on the default use case (simple borrow / simple lend). But for credit sellers who may want to sell future cash flow from existing loans (ie, lenders), they can also use the borrow offer to sell credit. You can see some examples of "speculators" who are just buying credit and selling credit and will submit these two limit orders to speculate on market rates here: `test_BuyCreditLimit_buyCreditLimit_experiment_strategy_speculator`. Another good way to see the borrow bid is that it’s simply an expression of how much the user values cash over credit, and thus is the price at which he would be happy to sell new credit for cash, or existing credit for cash. * * * Q: Why doesn't the protocol clear limit order after they are matched? A: The reason is that users may still want to be matched, and it is simpler on the accounting to not keep track of current borrows/lends vs desired borrows/lends. For example, suppose I am a borrower and I deposited collateral, and I want to borrow $1000 in total. I have submitted a limit order with my borrow yield curve. Maybe lender A can only lend me $200, then lender B $300, so I'm still waiting to be fully matched and I don't want to change my borrow offer while I'm not fully matched. The same logic applies to lenders. The way borrowers & lenders, respectively, can "protect" themselves is by * submitting a `openingBorrowLimitCR`, if borrowers want a maximum CR when a lender matches with them differently than the protocol-defined 150% * submitting a `maxDueDate`, if lenders don't want to lend past a certain point * * * Q: [Previous3.6 Claim](https://docs.size.credit/how-it-works/technical-docs/3.6-claim) [NextOfficial Links](https://docs.size.credit/official-links/official-links) Last updated 1 year ago --- # 3.5 Liquidations | Size Credit Docs [](https://docs.size.credit/how-it-works/technical-docs/3.5-liquidations#id-3.5.1-automatic-collateral-assignment) 3.5.1 Automatic Collateral Assignment ------------------------------------------------------------------------------------------------------------------------------------------------------------- The FROB has a cross-collateral system, meaning each loan is backed by an amount of collateral that is automatically computed when a "liquidability check" is performed. The criteria that is used is the pro rata collateral assignment: since each DebtPosition represents a percentage of the total borrower debt, that loan is backed by an equivalent percentage of the borrower collateral. To be able to compute the amount of auto-assigned collateral dynamically in a scalable way, the protocol tracks both * total borrower debt and * total borrower collateral so the automatically assigned collateral is CLB(t)\=DLB(t)DB(t)CB(t)C\_{L\_{B}}(t) = \\frac{D\_{L\_{B}}(t)}{D\_{B}(t)} C\_{B}(t)CLB​​(t)\=DB​(t)DLB​​(t)​CB​(t) with * CB(t)C\_{B}(t)CB​(t) the total collateral of the borrower BBB at the time ttt * DB(t)D\_{B}(t)DB​(t) the total debt of the borrower BBB at the time ttt * DLB(t)D\_{L\_{B}}(t)DLB​​(t) the total outstanding debt of the loan LBL\_{B}LB​ belonging to the borrower BBB at time ttt (amount due to the lenders) * CLB(t)C\_{L\_{B}}(t)CLB​​(t) the collateral automatically assigned to the loan LLL belonging to the borrower BBB at time ttt The notation stresses how all of these quantities change over time as the result of the various actions the borrower and lender can take, which are * DLB(t)D\_{L\_{B}}(t)DLB​​(t) can be partially reduced both by the borrower via partial repayment and the lender via self-liquidation (when it is allowed) * DB(t)D\_{B}(t)DB​(t) the total debt of the borrower changes as new loans are opened and closed * CB(t)C\_{B}(t)CB​(t) the total collateral of the borrower changes as he deposits and withdraws it or liquidations and self-liquidations happen [](https://docs.size.credit/how-it-works/technical-docs/3.5-liquidations#id-3.5.2-eligibility-for-liquidation) 3.5.2 Eligibility for Liquidation ----------------------------------------------------------------------------------------------------------------------------------------------------- Each loan has a collateral ratio computed as ρLB(t)\=CLB(t)DLB(t)\\rho\_{L\_{B}}(t) = \\frac{C\_{L\_{B}}(t)}{D\_{L\_{B}}(t)}ρLB​​(t)\=DLB​​(t)CLB​​(t)​ The protocol has 2 collateral thresholds that are checked * ρo\\rho\_{o}ρo​ the minimum collateral ratio for opening a new loan and * ρl<ρo\\rho\_{l} < \\rho\_{o}ρl​<ρo​ the minimum collateral ratio for making a loan eligible for a standard liquidation The initial values are set to * ρo\=150%\\rho\_{o} = 150\\%ρo​\=150% * ρl\=130%\\rho\_{l} = 130\\%ρl​\=130% Overdue loans are also eligible for liquidation, regardless of the borrower's collateral ratio. [](https://docs.size.credit/how-it-works/technical-docs/3.5-liquidations#id-3.5.3-liquidation-mechanisms) 3.5.3 Liquidation Mechanisms ------------------------------------------------------------------------------------------------------------------------------------------- ### [](https://docs.size.credit/how-it-works/technical-docs/3.5-liquidations#id-3.5.3.1-standard-liquidation) **3.5.3.1 Standard Liquidation** When a loan is eligible for standard liquidation, the liquidator is supposed to cover all the DLBD\_{L\_{B}}DLB​​ with an equivalent amount of USDC Since DLB\=VLBD\_{L\_{B}} = V\_{L\_{B}}DLB​​\=VLB​​ with * VLBV\_{L\_{B}}VLB​​ the face value of the loan, so the sum of all the related lender(s) credits In exchange, the liquidator gets an equivalent amount of collateral computed using our oracle price PPP at the time of liquidation If ρLB\>100%\\rho\_{L\_{B}} > 100\\%ρLB​​\>100% it means the liquidation is profitable, and there is an incentive reward to be paid to liquidators. The liquidator gets up to a fixed 5% reward on the loan's face value. Then, the collateral remainder is split as follows: This is split as follows * νb\\nu\_{b}νb​ collateral remainder percentage back to the liquidated borrower * νp\\nu\_{p}νp​ collateral remainder percentage to the protocol ### [](https://docs.size.credit/how-it-works/technical-docs/3.5-liquidations#id-3.5.3.2-self-liquidation) **3.5.3.2 Self Liquidation** When ρLB<100%\\rho\_{L\_{B}} < 100\\%ρLB​​<100% it means the loan is undercollateralized. Running a standard liquidation on such a loan would mean the liquidator suffers a net loss. This is a negative incentive for any 3rd party liquidator, so the only actors likely to perform a standard liquidation on an undercollateralized loan is one of Size's bots, with the purpose of taking a loss to make the lender whole. This kind of liquidation will be subsidized by means of an insurance fund. However, it is not possible to assume that insurance capacity will be sufficient to make all the lenders whole in every potential scenario. In this case, lenders can also perform a "self-liquidation". When this happens, the lender cancels an amount of debt in the DebtPosition equivalent to their credit and, in exchange, they get an amount of collateral equivalent to the percentage of the total credit of that loan, so its face value VLBV\_{L\_{B}}VLB​​, from the borrower reserves. If a lender EEE owns the credit γE,LB\\gamma\_{E, L\_{B}}γE,LB​​ on the loan LBL\_{B}LB​ then what happens is * the new debt of the loan is DLB′\=DLB−γE,LBD\_{L\_{B}}' = D\_{L\_{B}} - \\gamma\_{E, L\_{B}}DLB​′​\=DLB​​−γE,LB​​ * the amount CLBγE,LBVLBC\_{L\_{B}} \\frac{\\gamma\_{E, L\_{B}}}{V\_{L\_{B}}}CLB​​VLB​​γE,LB​​​ of collateral is transferred from the borrower BBB reserves to the lender EEE reserves Using this mechanism, a proactive lender can limit the loss when the price of the collateral drops quickly. This mechanism is designed to leave it as an individual choice of each lender whether to self-liquidate as a stop loss and carry some inventory risk (or swap the ETH back into stablecoins) or keep the loss unrealized hoping the collateral ratio goes up again. This operation does not change the collateralization of the borrower: **Proof** To simplify the notation let's redefine symbols as follows * CCC : auto-assigned collateral (previously known as CLBC\_{L\_{B}}CLB​​) * DDD : total loan debt (previously known as DLBD\_{L\_{B}}DLB​​) * x≤Dx \\le Dx≤D : amount of credit canceled in the self-liquidation process To recap, the self-liquidation mechanism works as follows * lender forgives xxx amount of credit and therefore the new debt is D′\=D−xD' = D - xD′\=D−x * in exchange, he receives collateral pro rata so the new collateral is C′\=C−CxDC' = C - C \\frac{x}{D}C′\=C−CDx​ so C′\=C(1−xD)C' = C(1 - \\frac{x}{D})C′\=C(1−Dx​) Collateral Ratio before ρ0\=CD\\rho\_{0} = \\frac{C}{D}ρ0​\=DC​ Collateral Ratio after ρ1\=C′D′\\rho\_{1} = \\frac{C'}{D'}ρ1​\=D′C′​ Let's compute the difference in CR so Δρ\=ρ0−ρ1\\Delta \\rho = \\rho\_{0} - \\rho\_{1}Δρ\=ρ0​−ρ1​ CD−C(1−xD)D−x\=CD−xC−CD+xCD(D−x)\=0\\frac{C}{D} - \\frac{C(1 - \\frac{x}{D})}{D - x} = \\frac{CD - xC - CD + xC}{D(D-x)} = 0DC​−D−xC(1−Dx​)​\=D(D−x)CD−xC−CD+xC​\=0 Let's double-check computing also the aggregated CR * CR Before C0+C1D0+D1\\frac{C\_{0} + C\_{1}}{D\_{0} + D\_{1}}D0​+D1​C0​+C1​​ where C0C\_{0}C0​ is the auto-assigned collateral to that loan and D0D\_{0}D0​ is the debt of that loan * CR After C1+C0(1−xD0)D1+D0−x\\frac{C\_{1} + C\_{0}(1 - \\frac{x}{D\_{0}})}{D\_{1} + D\_{0} - x}D1​+D0​−xC1​+C0​(1−D0​x​)​ Let's compute the delta CR and for the sake of simplicity let's skip the denominator since it is not relevant C0(D0−x)+C0D1+C1(D0−x)+C1D1−C0(1−xD0)(D0+D1)−C1(D0+D1)C\_{0}(D\_{0} - x) + C\_{0}D\_{1} + C\_{1}(D\_{0} - x) + C\_{1}D\_{1} - C\_{0}(1 - \\frac{x}{D\_{0}})(D\_{0} + D\_{1}) - C\_{1}(D\_{0}+D\_{1})C0​(D0​−x)+C0​D1​+C1​(D0​−x)+C1​D1​−C0​(1−D0​x​)(D0​+D1​)−C1​(D0​+D1​) Skipping the simplifications we get that this is equal to zero if x(C0D1D0−C1)\=0x(C\_{0} \\frac{D\_{1}}{D\_{0}} - C\_{1}) = 0x(C0​D0​D1​​−C1​)\=0 which is true if C0D0\=C1D1\\frac{C\_{0}}{D\_{0}} = \\frac{C\_{1}}{D\_{1}}D0​C0​​\=D1​C1​​ which means that a specific loan needs to have the same collateral ratio as all the other loans and we know this is always true by construction. ### [](https://docs.size.credit/how-it-works/technical-docs/3.5-liquidations#id-3.5.3.3-liquidation-with-replacement) **3.5.3.3 Liquidation with replacement** This mechanism consists of a liquidator performing a standard liquidation, but the repaid proceeds do not become immediately available for the lender(s) to be claimed but are used to fill a borrow market order instead, making sure that the due date remains the same as the one of the liquidated lender so the lender(s) can claim when they expect to Letting aside protocol fees that have already been taken on the liquidated loan during the standard liquidation process, at the due date the new borrower must return the face value of the liquidated loan VLBV\_{L\_{B}}VLB​​ plus the new protocol fees If the liquidation happens at time τ\\tauτ and the due date is at TTT then the new loan needs to have a duration of T−τT-\\tauT−τ and the corresponding rate is obtained by applying this term to the yield curve ΨB′\\Psi\_{B'}ΨB′​ of the new borrower B′B'B′ so that we obtain the new rate r′\=ΨB′(T−τ)r' = \\Psi\_{B'}(T - \\tau)r′\=ΨB′​(T−τ) which allows the computation of the actual amount to lend out aka issuance value ILB′\=VLBr′I\_{L\_{B'}} = \\frac{V\_{L\_{B}}}{r'}ILB′​​\=r′VLB​​​ of the new loan that replaces the old one. Since r′\>0r' > 0r′\>0 always then VLb\>ILB′V\_{L\_{b}} > I\_{L\_{B'}}VLb​​\>ILB′​​ and this determines a net profit VLb−ILB′V\_{L\_{b}} - I\_{L\_{B'}}VLb​​−ILB′​​ that is earned in cash by the protocol ### [](https://docs.size.credit/how-it-works/technical-docs/3.5-liquidations#id-3.5.3.4-overdue-liquidation) **3.5.3.4 Overdue Liquidation** When the loan is overdue, it is eligible for liquidation in the same way as underwater loans. However, overdue loans with healthy collateral ratios have reduced penalties for the borrower. [Previous3.4 Repayment](https://docs.size.credit/how-it-works/technical-docs/3.4-repayment) [Next3.6 Claim](https://docs.size.credit/how-it-works/technical-docs/3.6-claim) Last updated 1 year ago --- # 3.3 Market Orders | Size Credit Docs Notation * AAA : the exact amount of credit to be sold * rrr: absolute rate (not the APR) obtained by applying `debtPosition.dueDate` to the buyer yield curve * ΔT\\Delta TΔT : the remaining time to maturity i.e. `deltaT = debtPosition.dueDate - block.timestamp` * fff : Conditional Fragmentation Fee, can be zero or non-zero depending on specific conditions * f⋆f^{\\star}f⋆ : Actual Fragmentation Fee, equal to `fragmentationFee` in the protocol * kkk : Swap Fee defined as APR (so needs to be multiplied by a time to become an absolute rate) * VVV : the amount of cash swapped * AmaxA\_{max}Amax​ : the maximum amount of credit that can be traded which is equivalent to `creditPosition.credit` the amount the credit is entitled to ### [](https://docs.size.credit/how-it-works/technical-docs/3.3-market-orders#id-3.3.1-sell-credit-market-order-borrowing-market-order) 3.3.1 Sell Credit Market Order (borrowing market order) The FROB Borrowing Market Order can be used for different purposes. The mechanism is always the same: * the borrower specifies, in addition to MEV-protection parameters: * a `lender` * a `tenor` * an `creditPositionId` to sell * an `amount` to borrow * `exactAmountIn` whether the `amount` parameter means credit or cash * for the lender's limit order, the related `rate` is computed by applying the specified `tenor` to the limit order yield curve so r(ttenor)r(t\_{tenor})r(ttenor​) * as a result of this, given the `amount` and the `rate`, the future value of the loan related to that specific limit order is computed by applying the linear interest rate model If the borrower wants to take multiple loans, from N different lenders, they may do so with a `multicall` by submitting N borrowing market orders. **Observation:** thanks to its robust API, both existing and new credit may be sold through the `SellCreditMarket` function. By passing `type(uint256).max` as the `creditPositionId`, the system first creates a DebtPosition/CreditPosition pair assigned to the sender, in a "mint credit" internal operation, and then sells that CreditPosition to the lender. If an existing credit position is being sold, the `tenor` parameter is ignored, as it can be automatically computed from the related debt position. **3.3.1.1 To take a new fixed-rate loan** This is the primary purpose of the Sell Credit Market Order; to take a new fixed-rate loan, a borrower fills a lending limit order, and a DebtPosition, CreditPosition pair is created as a result. **3.3.1.2 To exit a loan you own** Lenders can "exit" their lending position before the due date by selling their credit to other lenders This is possible because the FROB as an order book without any further adaptation serves 2 purposes * to price the borrowing requests and * to price the credit aka future cashflow #### [](https://docs.size.credit/how-it-works/technical-docs/3.3-market-orders#id-3.3.1.3-technical-specification) 3.3.1.3 Technical specification * In this case, the `amountIn` is credit * With `exactAmountIn=true` * Formula * V\=A(1+r)(1−kΔT)−fV = \\frac{A}{(1+r)} (1 - k \\Delta T) - fV\=(1+r)A​(1−kΔT)−f * Preconditions * A≤AmaxA \\le A\_{max}A≤Amax​ since it is not possible to sell more credit than the `creditPosition.credit` * 0≤kΔT<10 \\le k \\Delta T < 10≤kΔT<1 since of course, we need to avoid the swap fee to eat the full or even exceed it, even though that's more of a theoretical issue since * the break-even is at ΔT\=1k\\Delta T = \\frac{1}{k}ΔT\=k1​ * the order of magnitude of the fee we are considering is 0.5% APR so the break-even would be for a credit whose remaining lifetime is 200 years. * Fragmentation Fee * if A\=AmaxA = A\_{max}A\=Amax​ then f\=0f = 0f\=0 since there is no fragmentation as the full credit is swapped * if AAmaxA > A\_{max}A\>Amax​ and therefore make the trading impossible * The turning point is for Amax\=VK+fKA\_{max} = VK + fKAmax​\=VK+fK meaning * Vmax,min\=Amax(1+r)(1−kΔT)−f⋆V\_{max, min} = \\frac{A\_{max}}{(1+r)} (1 - k \\Delta T) - f^{\\star}Vmax,min​\=(1+r)Amax​​(1−kΔT)−f⋆ * for which the trader can still sell the full amount, but the amount of cash it gets is less than the previous case since Vmax,min