diff --git a/vips/VIP-XNode-Contract-Support.md b/vips/VIP-XNode-Contract-Support.md new file mode 100644 index 0000000..f1813d4 --- /dev/null +++ b/vips/VIP-XNode-Contract-Support.md @@ -0,0 +1,69 @@ +--- +Title: Support Contracts for VeChainThor Node-Ownership +Description: Allow contracts to own VeChainThor Nodes to share ownership or benefits. +Author: Mario Micklisch (@ifavo) +Discussions: https://vechain.discourse.group/t/add-vip-support-contracts-for-vechainthor-node-ownership/50 +Category: Core +Status: Idea +CreatedAt: 2023-09-04 + +--- + +## Overview + +Contracts are widely used, for example in Multi-Sig-Wallets or for DAOs. VeChainThor Nodes can not be transferred to contracts due a restriction in the node-contract. +Lifting the transfer restriction to allow ownership for contracts will allow a widely shared use of VeChainThor Node, especially will it allow to form DAOs arround a single VeChainThor Node. + + +## Rationale + + + +## Specification + +The [Transfer-Function](https://github.com/vechain/ThorNode-contracts/blob/b3e1765ed7b1599b301602a0e0f72587cf24be1b/contracts/XOwnership.sol#L106) calls [`_transfer`]( https://github.com/vechain/ThorNode-contracts/blob/b3e1765ed7b1599b301602a0e0f72587cf24be1b/contracts/XOwnership.sol#L179-L195). + +Within `_transfer` the token recipient is [verified to be not a contract](https://github.com/vechain/ThorNode-contracts/blob/b3e1765ed7b1599b301602a0e0f72587cf24be1b/contracts/XOwnership.sol#L183): + +```sol + require(!_isContract(_to), "_to mustn't a contract"); +``` + +Removing this line will allow contracts to own VeChainThor Nodes. + +## Test Cases + +1. Deploy a Test-Receiver-Contract +2. Create new VeChainThor Node-Token +3. call `.transfer(, )` +4. `ownerOf()` equals Test-Receiver-Contract + +## Reference Implementation + + + +## Security Considerations + + + +Copyright and related rights waived via [CC0](./LICENSE.md).