Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notional fCash as collateral #378

Merged
merged 27 commits into from
Feb 25, 2022
Merged

Notional fCash as collateral #378

merged 27 commits into from
Feb 25, 2022

Conversation

alcueca
Copy link
Contributor

@alcueca alcueca commented Feb 16, 2022

  • Regular Join that takes ERC1155 assets, but is locked to a single id. No flash loans.
  • Minimal Ladle module to transfer ERC1155 assets. No permit.
  • Minimal Oracle that prices fCash at face value.

Check the README for more details.

All files have been stored in contracts/other/notional. We can have a discussion on how to organize this repo better.

  1. I think that we could keep specific integration contracts in other, which would also mean moving a bunch of oracles.
  2. The ERC1155.sol contract can be imported from solmate, or copied into utils.
  3. The Join1155 could go into a joins folder since it is not specific to any solution.

@alcueca alcueca marked this pull request as draft February 16, 2022 11:37
@alcueca alcueca closed this Feb 21, 2022
@alcueca
Copy link
Contributor Author

alcueca commented Feb 22, 2022

There is actually an ERC1155 wrapper for fCash

@alcueca alcueca reopened this Feb 22, 2022
@alcueca alcueca marked this pull request as ready for review February 22, 2022 14:43

fCash positions can be positive or negative. If positive they are equivalent for a lending position, and are redeemable at maturity for their face value. If negative they are borrowing positions.

We want to use fCash lending positions as collateral. Given that we know that they are redeemable for their face value at maturity and their volatility is low, they are good assets for that purpose.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we fairly certain on this? Should we consider if they are hacked or something and the face value cannot be redeemed?

@devtooligan
Copy link
Contributor

devtooligan commented Feb 22, 2022

Overall looks good. I didn't find any dealbreakers, just some suggestions and a couple questions.

Deploy scripts will be in a different pr, right? And we will be doing some mainnet fork tests at that time I guess? Two things to track when doing the mainnet fork tests are:

  1. Does the safeTransferFrom work properly when pointed to the main proxy ctrct
  2. remember to do the setApproval for the ladle

I'm happy to approve this after a little more discussion on some of the questions I brought up, the actual code change suggestions are not that important to me

contracts/other/notional/README.md Outdated Show resolved Hide resolved
@alcueca
Copy link
Contributor Author

alcueca commented Feb 23, 2022

No one of you found the brown m&m. Tsk, tsk.

@alcueca alcueca changed the title Draft: Notional fCash as collateral Notional fCash as collateral Feb 24, 2022
@alcueca
Copy link
Contributor Author

alcueca commented Feb 24, 2022

I'm merging this PR now, thanks for the feedback received. It remains a bit of thinking on how to reorganize the repository for continued development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants