Jason Garland
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Design Concepts - Modular - Separate credit creation & swaps? with erc bond standard for minted credit - Keep the core accounting as small as possible - ## Market Factory * Whitelisted market creators * Boolean to disable whitelist to enable permissionless market creation * Market creators earn a percent of fees collected from that market in perpetuity * This is tradeable as a market NFT * The fee is Size governance variable bounded by the range 0.01-0.15%, initially set to 0.05% * Squatting (some pros, some cons) - could also pre-mint/reserve popular markets ## Markets Markets may be created by submitting the following parameters: * loanToken * collateralToken * oracle * lltv (liquidation LTV) * In 5% steps (or on some more intelligent curve, see Ajna price bucket increment math?) * look into why Euler added an openingLTV back into their code after audit ### Token Support **loanToken** - non-rebasing only (lenders must select markets with wrapped yield bearing tokens to earn passively) **collateralToken** - rebasing (yield accrues to borrower) ### Oracle Oracle endpoints will be whitelisted, at least initially. [I assume there's a way to do this so that you could whitelist "any asset on Chainlink" and eventually "any asset on Uniswap, with some adapter that looks at TVL and figures out a TWAP"?] [Morpho requires a single endpoint for every market] ### LLTV The liquidation LTV is the only LTV, meaning there is no separate opening LTV, and positions may become immediately liquidatable. It will be up to frontends to convey the risks, or prevent loans, with low starting LTVs. ## Deposits Deposits of any loanToken to Size v2 can be used to make offers on any number of markets with that loanToken. For example, I might deposit USDC and create offers to lend on 10 markets where USDC is the loanToken. ### Passive Interest ~~Users may elect to earn interest on qualifying unmatched deposits. For example, users may choose to have all USDC earn the Aave variable rate while unmatched. When borrowed, these funds are withdrawn from Aave and sent to the borrower.~~ ~~Technical question here about balancing/rebalancing if user has deposits in multiple places, and how to track where to pull funds from.~~ In order to earn passive interest, lenders must deposit to a market where the loanToken is yield-bearing. Only wrapped assets will be supported initially for loanToken. ## Fees #### Swap Fee Charged in quoteToken? #### Fragmentation Fee Fee for fragmenting liquidity. #### Wrap Fee See tokenized credit section. ## Tokenized Credit ERC-1155? Non-fungible on maturity dimension. Leverage provider? (Therefore enabling leveraged interest rate speculation) ## Leverage Provider Markets 80%ConversionRate (time component??) on ETH-USDC_LLTV50 (conversion rate vs interest rate vs time?) ## Collateral **Option A)** Collateral is shared across an asset-oracle pair (collateralToken, quoteToken, oracle), but not shared elsewhere ~~Option B)** Each debt position is tokenized and associated with collateral (CDP-type model)~~ **Cross-compensate:** Credits with lower LLTV may be used to compensate debt positions of the same asset and oracle with higher LLTV. *Hard to know whether this is worth including since we don't know if people like to use compensate().* ## Liquidations Overdue loans may be liquidated. Loans where LTV > LLTV can be liquidated. Loans where LTV > 100 can be dissolved by taking collateral. ## Passive Interest Push lender deposits into Aave, Morpho, or other variable rate pools while unmatched. Lender should also be able to choose "no variable rate". Would require adapters for every protocol supported (or more? on a token basis in some cases?) Question: how do we track where the money is if multiple are supported? (does user need to specify from off-chain source? or do we maintain some sort of on-chain registry of where the money is deposited) ## Arbitrary Price Hooks Do we want to take the Uniswap approach and allow arbitrary interest rate pricing? Is this significantly more work for our FE/BE if individual user pricing is pointing at external contract endpoints? ## Symmetrical Splits [perhaps we don't need] Both debt and credit able to be split. ## Partial Repays Allow partial repay of debt. ### Partial Liquidations Also allow partial liquidations. ## Delegating Pricing “delegate the pricing/appoint a manager” -> USDC and ETH, and gauntlet has offers on USDC, ETH, WBTC, LINK, etc - Small fee to delegate - unexplored details here, like offers to sell credit ## Delegating Other Things? collateral management --- ## POTENTIALLY IN SCOPE ### Flash loans --- ## QUESTIONS Vaults? Collateral management? Do we support yield bearing tokens? And if so, does debt to lender grow with yield/rebase? - Borrow token: Yes, debt remains constant - Collateral token: Yes, i.e. wstETH Signature support? --- ## NOT CURRENTLY IN SCOPE ### RFQs Not in scope now, but perhaps if we have an extra dev we can handle also having RFQs. Can we design it in a way where the protocol can add new order book modules? For example, can we design v2 in a way where we could later plug in an RFQ module and specify/call it when a user submits a txn? ### Coupons Not in scope. Sablier/Superfluid-type streaming.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully