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

Add EIP: Encumber #7246

Closed
wants to merge 6 commits into from
Closed

Conversation

coburncoburn
Copy link

When opening a pull request to submit a new EIP, please use the suggested template: https://github.com/ethereum/EIPs/blob/master/eip-template.md

We have a GitHub bot that automatically merges some PRs. It will merge yours immediately if certain criteria are met:

  • The PR edits only existing draft PRs.
  • The build passes.
  • Your GitHub username or email address is listed in the 'author' header of all affected PRs, inside .
  • If matching on email address, the email address is the one publicly listed on your GitHub profile.

@github-actions github-actions bot added c-new Creates a brand new proposal s-draft This EIP is a Draft t-erc w-ci Waiting on CI to pass labels Jun 27, 2023
@coburncoburn coburncoburn force-pushed the encumber branch 2 times, most recently from 8716d0c to 72f84f4 Compare June 27, 2023 20:38
@coburncoburn coburncoburn changed the title fill out template for encumber Encumber: enabling non-custodial DeFi Jun 27, 2023
@coburncoburn coburncoburn force-pushed the encumber branch 2 times, most recently from 102e031 to 23438e7 Compare June 28, 2023 01:29
EIPS/eip-encumber.md Outdated Show resolved Hide resolved
@github-actions
Copy link

The commit add17ee (as a parent of 6eab861) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Jun 28, 2023
EIPS/eip-7246.md Outdated Show resolved Hide resolved
EIPS/eip-7246.md Outdated Show resolved Hide resolved
EIPS/eip-7246.md Outdated Show resolved Hide resolved
EIPS/eip-7246.md Outdated Show resolved Hide resolved
EIPS/eip-7246.md Outdated Show resolved Hide resolved
EIPS/eip-7246.md Outdated Show resolved Hide resolved
@coburncoburn coburncoburn force-pushed the encumber branch 3 times, most recently from 23df83a to 5286f61 Compare June 28, 2023 23:05
*
* Any function which would reduce balanceOf(owner) below encumberedBalanceOf(owner) MUST revert
*/
function encumberedBalanceOf(address owner) external returns (uint);

Choose a reason for hiding this comment

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

can this be a view?

* This value increases when {encumber} or {encumberFrom} are called by the `owner` or by another permitted account.
* This value decreases when {release} and {transferFrom} are called by `taker`.
*/
function encumbrances(address owner, address taker) external returns (uint);

Choose a reason for hiding this comment

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

this can also be a view, yeah?

@eth-bot
Copy link
Collaborator

eth-bot commented Jul 19, 2023

File EIPS/eip-7246.md

Requires 1 more reviewers from @axic, @Pandapip1, @SamWilsn, @xinbenlv

@eth-bot eth-bot changed the title Encumber: enabling non-custodial DeFi Add EIP: Encumber Jul 19, 2023
@eth-bot eth-bot added e-consensus Waiting on editor consensus e-review Waiting on editor to review labels Jul 19, 2023
@adrianmcli
Copy link

adrianmcli commented Aug 6, 2023

Hi @coburncoburn, this is a very interesting proposal to me as a previous editor of EIP-2615 (NFT w/ mortgage and rental functions).

I can see this becoming a new financial primitive, but I suggest that we add one more function to allow for the secondary trading of encumbrances without needing to move the tokens around with transferFrom.

In other words, we want to allow takers to easily transfer their encumbrances to other takers.

See example:

function transferEncumbranceRights(address owner, address newTaker, uint amount) external {
    // Ensure caller has enough encumbrance for the transfer
    require(encumbrances[owner][msg.sender] >= amount, "Insufficient encumbrance");

    // Reduce the encumbrance of the old taker
    encumbrances[owner][msg.sender] -= amount;

    // Increase the encumbrance of the new taker
    encumbrances[owner][newTaker] += amount;

    // Emit an event for tracking
    emit EncumbranceRightsTransferred(owner, msg.sender, newTaker, amount);
}

event EncumbranceRightsTransferred(
    address indexed owner, 
    address indexed oldTaker, 
    address indexed newTaker, 
    uint amount
);

Please let me know your thoughts.

@YaroslavPysanskyi

This comment was marked as off-topic.

@CEOBert
Copy link

CEOBert commented Aug 6, 2023

Hey guys, @coburncoburn,

I'm part of Inclusio Labs we are a startup (with deep experience in TradFi lending and structured debt) focused on building financial inclusion products, starting with a new type of oracle-free lending protocol.

I was excited to see this standard come up. I believe in it strongly and want to help in the drafting process.

@scott-silver
Copy link

@adrianmcli That's a really interesting idea. Transferring debt/encumbrance seems very useful.

One question: does transferEncumbranceRights require a separate event? Would it be sufficient to use the existing Encumber and Release events?

emit Release(owner, msg.sender, amount);
emit Encumber(owner, newTaker, amount);

event Encumber(address indexed owner, address indexed taker, uint amount);

/**
* @dev Emitted when the encumbrance of a `taker` to an `owner` is reduced by `amount`.

Choose a reason for hiding this comment

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

Should read:

* @dev Emitted when the encumbrance of an `owner` to a `taker` is reduced by `amount`.

@SamWilsn
Copy link
Contributor

I am closing this pull request because we are in the process of separating EIPs and ERCs into distinct repositories. Unfortunately, as far as we are aware, GitHub does not provide any tools to ease this migration, so every pull request will need to be re-opened manually.

As this is a PR to create / modify an ERC, I will kindly ask you to redirect this to the new repository at ethereum/ERCs. We have prepared a guide to help with the process.

If there is relevant history here, please link to this PR from the new pull request.

On behalf of the EIP Editors, I apologize for this inconvenience.

@SamWilsn SamWilsn closed this Oct 25, 2023
@coburncoburn
Copy link
Author

ethereum/ERCs#54 The new home of this standard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-new Creates a brand new proposal e-consensus Waiting on editor consensus e-review Waiting on editor to review s-draft This EIP is a Draft t-erc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants