-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add EIP: NFT Flashloans #6682
Add EIP: NFT Flashloans #6682
Conversation
✅ All reviewers have approved. |
EIP editors assign EIP numbers (as per EIP-1), which is generally the PR number. #6680 is a spam issue, whilst this PR is #6682 |
EIPS/eip-6680.md
Outdated
@@ -0,0 +1,161 @@ | |||
--- | |||
eip: 6680 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eip: 6680 | |
eip: 6682 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
The commit cd88b3a (as a parent of b71a881) contains errors. |
@SamWilsn are the rest of the changes ok? |
@outdoteth This is very interesting! I would think
Questions:
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@RongxinZhang I answered a similar question to yours about potential use cases in the eth magicians thread |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll also need to address the eipw
errors. You can see the annotations on the "Files changed" tab of this PR, or the full output in the logs on the "Checks" tab. Each annotation should have a link explaining the rule and why we enforce them.
We generally don't make exceptions to these rules.
EIPS/eip-6682.md
Outdated
|
||
The current flashloan standard, [ERC-3156](./eip-3156.md), only supports [ERC-20](./eip-20.md) tokens. ERC-721 tokens are sufficiently different from ERC-20 tokens that they require an extension of this existing standard to support them. | ||
|
||
In most cases, the handling of fee payments will be desired to be paid in a seperate currency to the loaned NFTs because NFTs themselves cannot always be fractionalized. Consider the following example where the flashloan provider charges a 0.1 ETH fee on each NFT that is flashloaned; The interface must provide methods that allow the borrower to determine the fee rate on each NFT and also the currency that the fee should be paid in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This paragraph belongs more in the Rationale section. The Motivation section should justify the existence of the proposal as a whole, while the Rationale section should explain technical choices made within the standard. In this case, supporting a separate currency for fee payment sounds like a technical choice within this standard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
EIPS/eip-6682.md
Outdated
|
||
The current flashloan standard, [ERC-3156](./eip-3156.md), only supports [ERC-20](./eip-20.md) tokens. ERC-721 tokens are sufficiently different from ERC-20 tokens that they require an extension of this existing standard to support them. | ||
|
||
In most cases, the handling of fee payments will be desired to be paid in a seperate currency to the loaned NFTs because NFTs themselves cannot always be fractionalized. Consider the following example where the flashloan provider charges a 0.1 ETH fee on each NFT that is flashloaned; The interface must provide methods that allow the borrower to determine the fee rate on each NFT and also the currency that the fee should be paid in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In most cases, the handling of fee payments will be desired to be paid in a seperate currency to the loaned NFTs because NFTs themselves cannot always be fractionalized. Consider the following example where the flashloan provider charges a 0.1 ETH fee on each NFT that is flashloaned; The interface must provide methods that allow the borrower to determine the fee rate on each NFT and also the currency that the fee should be paid in. | |
In most cases, the handling of fee payments will be desired to be paid in a separate currency to the loaned NFTs because NFTs themselves cannot always be fractionalized. Consider the following example where the flashloan provider charges a 0.1 ETH fee on each NFT that is flashloaned; The interface must provide methods that allow the borrower to determine the fee rate on each NFT and also the currency that the fee should be paid in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
EIPS/eip-6682.md
Outdated
## Reference Implementation | ||
|
||
```solidity | ||
// SPDX-License-Identifier: MIT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code included inline in the document must be licensed under CC0-1.0
. You can remove the comment, put the reference implementation in ../assets/eip-6682/
, or:
// SPDX-License-Identifier: MIT | |
// SPDX-License-Identifier: CC0-1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
EIPS/eip-6682.md
Outdated
type: Standards Track | ||
category: ERC | ||
created: 2023-03-12 | ||
requires: 721, 3156 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requires: 721, 3156 | |
requires: 20, 721, 3156 |
The fees are paid in ERC-20 tokens, so it's a hard requirement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All Reviewers Have Approved; Performing Automatic Merge...
This standard is an extension of the existing flashloan standard (EIP-3156) to support ERC-721 NFT flashloans. It proposes a way for flashloan providers to lend NFTs to contracts, with the condition that the loan is repaid in the same transaction along with some fee.