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

Function for secondary trading of encumbrances #23

Open
adrianmcli opened this issue Aug 6, 2023 · 1 comment
Open

Function for secondary trading of encumbrances #23

adrianmcli opened this issue Aug 6, 2023 · 1 comment

Comments

@adrianmcli
Copy link

adrianmcli commented Aug 6, 2023

I originally made a comment here regarding this: ethereum/EIPs#7246 (comment)

I like the idea for the EIP7246 standard but I believe it's necessary to bake in a way (within the standard) to transfer encumbrances. So here is my proposed addition:

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
);

I might be completely off-base here, but wanted to get the discussion started. I am also happy to make a PR.

Another alternative to address this use-case would be to simply require the issuing of receipt tokens whenever an encumbrance is created. But I think that might be too much overhead compared to adding this simple function.

Please let me know your thoughts.

@CEOBert
Copy link

CEOBert commented Aug 6, 2023

This is a great point @adrianmcli , mechanically (and in an efficient manner) this should be possible to do in whole or in part and to a single or multiple new takers

This is important for the types of products it would enable on-top

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

No branches or pull requests

2 participants