buttonwood-protocol / button-wrappers

Solidity code for the ButtonToken rebasing wrapper protocol
GNU General Public License v3.0
13 stars 10 forks source link

Governance integration #40

Open aalavandhan opened 3 years ago

aalavandhan commented 3 years ago

Would be great if the owner has the ability to participate in governance systems of other protocols with the assets held.

Look into how protocols vote with tokens under management

DPI, COMP etc)

aalavandhan commented 3 years ago

I wonder if it could be as simple as allowing the owner to call functions on behalf of the contract.

function externalCall(address destination, bytes calldata data, uint256 value) external payable onlyOwner {
    require(destination != address(this)); // prevents the owner from transferring funds out
    destination.call{value: value}(data);
}

Now the owner can delegate voting power (based on the contract held balance), by calling through to the governance system.