Skip to content

Private pool #37

Open
wants to merge 112 commits into
base: main
Choose a base branch
from
Open

Private pool #37

wants to merge 112 commits into from

Commits on Nov 26, 2021

  1. .editorconfig

    Barry Lyndon committed Nov 26, 2021
    Configuration menu
    Copy the full SHA
    5454f5d View commit details
    Browse the repository at this point in the history
  2. (Personal formatting settings)

    Barry Lyndon committed Nov 26, 2021
    Configuration menu
    Copy the full SHA
    830e8e0 View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2021

  1. Add Private Lending pool (WIP, untested)

    Kashi pair with the following changes:
    
    - Charge protocol fee on liquidations
    - Charge protocol fee on borrow open
    - Allow only one lender, and a whitelist of borrowers
    - Collect fees as soon as feasible; do not "reinvest"
    - Add option to seize collateral on liquidation.
      Bonus and fees are taken out in the collateral as well
    - Add expiration (liquidation-free period)
    Barry Lyndon committed Dec 1, 2021
    Configuration menu
    Copy the full SHA
    098e0fa View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2021

  1. (Archive oracles and swappers to silence warnings)

    Barry Lyndon committed Dec 9, 2021
    Configuration menu
    Copy the full SHA
    ae063b3 View commit details
    Browse the repository at this point in the history
  2. Enforce limits on init() settings

    Barry Lyndon committed Dec 9, 2021
    Configuration menu
    Copy the full SHA
    3048143 View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2021

  1. Make feesOwedAmount public

    Barry Lyndon committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    e868f5b View commit details
    Browse the repository at this point in the history
  2. Reword some things for symmetry/uniformity

    Barry Lyndon committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    1365a2e View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2021

  1. Remove some overflow checks with proof

    Barry Lyndon committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    11c9a15 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2021

  1. Add deployment script and some tests

    Barry Lyndon committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    a2d8530 View commit details
    Browse the repository at this point in the history
  2. Use full math in isSolvent check

    Barry Lyndon committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    9a2a087 View commit details
    Browse the repository at this point in the history
  3. Revert "(Archive oracles and swappers to silence warnings)"

    This reverts commit ae063b3.
    Barry Lyndon committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    f14bc0e View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2021

  1. Change expiration logic: if set, everyone insolvent after

    Barry Lyndon committed Dec 15, 2021
    Configuration menu
    Copy the full SHA
    8a9812b View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2021

  1. Test loan repayment and "fees owed" logic

    Barry Lyndon committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    b3461a4 View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2021

  1. Remove some more overflow checks with proof

    Barry Lyndon committed Dec 18, 2021
    Configuration menu
    Copy the full SHA
    22b5f65 View commit details
    Browse the repository at this point in the history
  2. Fix in-kind liquidation bonus calculation

    Barry Lyndon committed Dec 18, 2021
    Configuration menu
    Copy the full SHA
    889d833 View commit details
    Browse the repository at this point in the history
  3. Test regular and in-kind liquidations

    Barry Lyndon committed Dec 18, 2021
    Configuration menu
    Copy the full SHA
    643a85a View commit details
    Browse the repository at this point in the history

Commits on Dec 26, 2021

  1. Start NFT-collateral contract (draft)

    Notable features/differences:
    - Same lender / borrowers model as PrivatePool
    - ERC-721 contract as collateral
    - One loan per contract token
    - Interest auto-compounds; no accrue()
    - Repayment can only be in full
    - Open fee comes out of principal
    - Lender can update loan parameters. If a loan is currently taken out
      then the update succeeds as long as it benefits the borrower.
    - No "flash borrows". (Would probably use a separate borrow function).
    - Expirations are required, and collateral gets auto-seized by the
      lender on expiration. Other than that, no liquidations.
    Barry Lyndon committed Dec 26, 2021
    Configuration menu
    Copy the full SHA
    a7ffbaf View commit details
    Browse the repository at this point in the history
  2. Extract old OpenZeppelin code to avoid conflicts

    Barry Lyndon committed Dec 26, 2021
    Configuration menu
    Copy the full SHA
    2f2e66c View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2022

  1. Configuration menu
    Copy the full SHA
    cdc2af9 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2022

  1. Configuration menu
    Copy the full SHA
    c712693 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d040039 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2022

  1. Configuration menu
    Copy the full SHA
    a2194ab View commit details
    Browse the repository at this point in the history
  2. (Pull in new BoringSolidity with ERC721)

    Barry Lyndon committed Jan 25, 2022
    Configuration menu
    Copy the full SHA
    744bf7c View commit details
    Browse the repository at this point in the history
  3. (Format all .ts files with "yarn format")

    Barry Lyndon committed Jan 25, 2022
    Configuration menu
    Copy the full SHA
    997b59d View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2022

  1. Refactor removeCollateral

    Barry Lyndon committed Jan 31, 2022
    Configuration menu
    Copy the full SHA
    3d7a45c View commit details
    Browse the repository at this point in the history
  2. Make "compound interest terms" a per-loan setting

    Barry Lyndon committed Jan 31, 2022
    Configuration menu
    Copy the full SHA
    630e3d1 View commit details
    Browse the repository at this point in the history
  3. Borrow: Pass loan params as struct

    Barry Lyndon committed Jan 31, 2022
    Configuration menu
    Copy the full SHA
    49b7342 View commit details
    Browse the repository at this point in the history
  4. Emit event on updating loan params

    Barry Lyndon committed Jan 31, 2022
    Configuration menu
    Copy the full SHA
    a74f96f View commit details
    Browse the repository at this point in the history
  5. Add some tests for the NFT contract

    Barry Lyndon committed Jan 31, 2022
    Configuration menu
    Copy the full SHA
    79e192b View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2022

  1. Always allow liquidation of insolvent positions

    Barry Lyndon committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    3c843d3 View commit details
    Browse the repository at this point in the history
  2. Explicitly test PrivatePool contract size limit

    Barry Lyndon committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    17a641d View commit details
    Browse the repository at this point in the history
  3. Always update exhchange rate in _isSolvent()

    Barry Lyndon committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    8b07fc5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    824e179 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2022

  1. NFT pair revisions -- untested draft

    Major changes from "PrivatePoolNFT:
        - Do not restrict borrowers and lenders
        - Borrowers provide collateral and loan terms, lenders take or leave
        - Assets are transfered instantly on lend/repay; the contract holds
          no user balances
        - Paying off a loan ends it, rather than leaving the borrower with
          the option to take it out again. This is because loans are now
          initiated by the lender.
    Barry Lyndon committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    16524b9 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2022

  1. Allow repayments from anyone

    Barry Lyndon committed Mar 5, 2022
    Configuration menu
    Copy the full SHA
    5ad449e View commit details
    Browse the repository at this point in the history
  2. Consistently case event messages

    Barry Lyndon committed Mar 5, 2022
    Configuration menu
    Copy the full SHA
    e4dac51 View commit details
    Browse the repository at this point in the history
  3. Reorder requestLoan parameters and add cook action

    Barry Lyndon committed Mar 5, 2022
    Configuration menu
    Copy the full SHA
    afc1e1a View commit details
    Browse the repository at this point in the history
  4. Fix lend(): store lender

    Barry Lyndon committed Mar 5, 2022
    Configuration menu
    Copy the full SHA
    0d57880 View commit details
    Browse the repository at this point in the history
  5. Fix calculateInterest (and improve comments)

    Barry Lyndon committed Mar 5, 2022
    Configuration menu
    Copy the full SHA
    fdc3d4f View commit details
    Browse the repository at this point in the history
  6. Add NFT tests (WIP)

    Barry Lyndon committed Mar 5, 2022
    Configuration menu
    Copy the full SHA
    6fbf382 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2022

  1. Hardcode COMPOUND_INTEREST_TERMS

    Barry Lyndon committed Mar 11, 2022
    Configuration menu
    Copy the full SHA
    243921f View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2022

  1. Signed lend/borrow

    Barry Lyndon committed Mar 12, 2022
    Configuration menu
    Copy the full SHA
    1d43ef3 View commit details
    Browse the repository at this point in the history
  2. Add some tests for recent changes (partial)

    Barry Lyndon committed Mar 12, 2022
    Configuration menu
    Copy the full SHA
    40e2a98 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2022

  1. Make feesEarnedShare public

    Barry Lyndon committed Mar 16, 2022
    Configuration menu
    Copy the full SHA
    c06426c View commit details
    Browse the repository at this point in the history
  2. Index tokenId in LogRepay event

    Barry Lyndon committed Mar 16, 2022
    Configuration menu
    Copy the full SHA
    92d1efd View commit details
    Browse the repository at this point in the history
  3. (Remove old TODO comments)

    Barry Lyndon committed Mar 16, 2022
    Configuration menu
    Copy the full SHA
    df2b5f3 View commit details
    Browse the repository at this point in the history
  4. Add tests for repay()

    Barry Lyndon committed Mar 16, 2022
    Configuration menu
    Copy the full SHA
    12f517b View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2022

  1. Signed lend/borrow: Include all addresses in signature

    Barry Lyndon committed Mar 17, 2022
    Configuration menu
    Copy the full SHA
    15e56cc View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2022

  1. Fix precalculated borrow signature hash

    Barry Lyndon committed Mar 20, 2022
    Configuration menu
    Copy the full SHA
    257425f View commit details
    Browse the repository at this point in the history
  2. Add tests for signed lend/borrow

    Barry Lyndon committed Mar 20, 2022
    Configuration menu
    Copy the full SHA
    138f82b View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2022

  1. Configuration menu
    Copy the full SHA
    388f48f View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2022

  1. (Add missing semicolon)

    Barry Lyndon committed Mar 26, 2022
    Configuration menu
    Copy the full SHA
    f71f52a View commit details
    Browse the repository at this point in the history
  2. Rework lend() tests to account for open fee change

    Barry Lyndon committed Mar 26, 2022
    Configuration menu
    Copy the full SHA
    5cce3c7 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'private-pool-additions' into private-pool

    Barry Lyndon committed Mar 26, 2022
    Configuration menu
    Copy the full SHA
    c6c4f0c View commit details
    Browse the repository at this point in the history
  4. Add cook actions for signed methods

    Barry Lyndon committed Mar 26, 2022
    Configuration menu
    Copy the full SHA
    ffeb27d View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2022

  1. LendClub changes

    0xm3rlin committed Apr 8, 2022
    Configuration menu
    Copy the full SHA
    a50400c View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2022

  1. Improve test coverage to all but cooks; start cook tests

    Barry Lyndon committed Apr 10, 2022
    Configuration menu
    Copy the full SHA
    abb0ba6 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2022

  1. Disallow calls to the collateral contract

    Barry Lyndon committed Apr 11, 2022
    Configuration menu
    Copy the full SHA
    5bf6699 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2022

  1. Rework lend/borrow signatures; add "any token" option

    Barry Lyndon committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    8474d9a View commit details
    Browse the repository at this point in the history
  2. Merge private-pool-lendingclub (some fixes; no tests)

    Barry Lyndon committed Apr 13, 2022
    Configuration menu
    Copy the full SHA
    3ba37d7 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2022

  1. Slightly change LendingClub signature and add test case

    Barry Lyndon committed Apr 14, 2022
    Configuration menu
    Copy the full SHA
    8828d48 View commit details
    Browse the repository at this point in the history
  2. (Address warning on mock contract)

    Barry Lyndon committed Apr 14, 2022
    Configuration menu
    Copy the full SHA
    208e61f View commit details
    Browse the repository at this point in the history
  3. Take duration instead of expiration as loan parameter

    Barry Lyndon committed Apr 14, 2022
    Configuration menu
    Copy the full SHA
    a75094d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bc882ec View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2022

  1. Cooks: Add ACTION_LEND and some tests

    Barry Lyndon committed Apr 21, 2022
    Configuration menu
    Copy the full SHA
    a8bb75a View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2022

  1. (Add deployment script for NFTPair master contract)

    Barry Lyndon committed Apr 23, 2022
    Configuration menu
    Copy the full SHA
    7783787 View commit details
    Browse the repository at this point in the history
  2. (Format/clean up PrivatePool deploy script)

    Barry Lyndon committed Apr 23, 2022
    Configuration menu
    Copy the full SHA
    c6801ea View commit details
    Browse the repository at this point in the history
  3. (Apply standard formatting to some config files)

    Barry Lyndon committed Apr 23, 2022
    Configuration menu
    Copy the full SHA
    6eac385 View commit details
    Browse the repository at this point in the history
  4. Deploy a mock NFTPair ecosystem on Ropsten

    Barry Lyndon committed Apr 23, 2022
    Configuration menu
    Copy the full SHA
    8e370fc View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1f7d3a9 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d808861 View commit details
    Browse the repository at this point in the history
  7. (Whitelist master contract in Ropsten mock deployment)

    Barry Lyndon committed Apr 23, 2022
    Configuration menu
    Copy the full SHA
    3161f3b View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2022

  1. Added Oracle

    0xm3rlin committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    dbacda0 View commit details
    Browse the repository at this point in the history
  2. renamed contract

    0xm3rlin committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    6bd5af7 View commit details
    Browse the repository at this point in the history
  3. Removed renamed contract

    0xm3rlin committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    750b1ae View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ae47d03 View commit details
    Browse the repository at this point in the history
  5. More thoroughly check for expiration logic

    Barry Lyndon committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    a0a802b View commit details
    Browse the repository at this point in the history
  6. (Comments / auto-formatted line endings)

    Barry Lyndon committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    0af7ea3 View commit details
    Browse the repository at this point in the history
  7. Add LTV to relevant checks / parameter lists

    Barry Lyndon committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    aa2ff04 View commit details
    Browse the repository at this point in the history
  8. Rename ltv => ltvBPS

    Barry Lyndon committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    9d59ccf View commit details
    Browse the repository at this point in the history
  9. Formatting

    Barry Lyndon committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    741a255 View commit details
    Browse the repository at this point in the history
  10. Update signature hashes

    Barry Lyndon committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    5f6f302 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2022

  1. Fix LTV parameter comparison check

    Barry Lyndon committed Apr 29, 2022
    Configuration menu
    Copy the full SHA
    7e3a383 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2022

  1. Enforce that the oracle cannot be changed

    Barry Lyndon committed Apr 30, 2022
    Configuration menu
    Copy the full SHA
    ba4b627 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2022

  1. Add cook test scenario for BentoBox transfers

    Barry Lyndon committed May 27, 2022
    Configuration menu
    Copy the full SHA
    d15cad3 View commit details
    Browse the repository at this point in the history
  2. Allow the lender to "liquidate" to a different address

    Barry Lyndon committed May 27, 2022
    Configuration menu
    Copy the full SHA
    d05d931 View commit details
    Browse the repository at this point in the history
  3. Deduplicate names in "WithOracle" contract

    Barry Lyndon committed May 27, 2022
    Configuration menu
    Copy the full SHA
    e179cd4 View commit details
    Browse the repository at this point in the history
  4. Remove unused import of BoringRebase

    Barry Lyndon committed May 27, 2022
    Configuration menu
    Copy the full SHA
    b364ed1 View commit details
    Browse the repository at this point in the history
  5. (init and updateLoanParams can be external)

    Barry Lyndon committed May 27, 2022
    Configuration menu
    Copy the full SHA
    1818676 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2022

  1. Add flash repayments and borrowing - swappers and cook

    Barry Lyndon committed Jun 5, 2022
    Configuration menu
    Copy the full SHA
    c05979d View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2022

  1. Only expire loans AFTER duration has passed

    Barry Lyndon committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    60d4e1c View commit details
    Browse the repository at this point in the history
  2. Include more detail in events

    Barry Lyndon committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    bf367df View commit details
    Browse the repository at this point in the history
  3. (Shorten revert message)

    Barry Lyndon committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    a349016 View commit details
    Browse the repository at this point in the history
  4. (Add revert message to interest calc)

    Barry Lyndon committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    bf38d46 View commit details
    Browse the repository at this point in the history
  5. (Spelling transfered -> transferred)

    Barry Lyndon committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    f6555a1 View commit details
    Browse the repository at this point in the history
  6. Fix comments; fix _repayBefore() accessibility

    Barry Lyndon committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    db06bf9 View commit details
    Browse the repository at this point in the history
  7. Clear loan params whenever loan is cleared

    Barry Lyndon committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    394e82a View commit details
    Browse the repository at this point in the history
  8. BringNFTPairWithOracle up to parity

    Barry Lyndon committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    12f4bf5 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2022

  1. (Cache some BentoBox calculations)

    Barry Lyndon committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    635dc51 View commit details
    Browse the repository at this point in the history
  2. Add partial repayments

    Barry Lyndon committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    a71a60f View commit details
    Browse the repository at this point in the history
  3. (Cache some reads)

    Barry Lyndon committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    8e41876 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2022

  1. Use principal amount for partial repayments instead

    Barry Lyndon committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    05cd528 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2022

  1. (Cache another read of asset)

    Barry Lyndon committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    f51b091 View commit details
    Browse the repository at this point in the history
  2. Round required BentoBox shares up for repayments

    Barry Lyndon committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    6a82726 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    05e4088 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2022

  1. (Put mock BentoBox contracts back)

    Barry Lyndon committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    d1bfcb1 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2022

  1. Fix type annotations and format for PrivatePool tests

    Barry Lyndon committed Jul 3, 2022
    Configuration menu
    Copy the full SHA
    01609d2 View commit details
    Browse the repository at this point in the history
  2. Still archive the PrivatePool tests

    Barry Lyndon committed Jul 3, 2022
    Configuration menu
    Copy the full SHA
    e1cf116 View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2022

  1. Configuration menu
    Copy the full SHA
    1a9d166 View commit details
    Browse the repository at this point in the history
  2. Start NFT price floor example

    Barry Lyndon committed Aug 30, 2022
    Configuration menu
    Copy the full SHA
    6ec5a2e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b376874 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2022

  1. (Fix lending pool mock)

    Barry Lyndon committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    96aa80f View commit details
    Browse the repository at this point in the history