{"repo":"cowdao-grants/cow-shed","free":true,"listed":false,"github":"https://github.com/cowdao-grants/cow-shed","clone":"git clone https://github.com/cowdao-grants/cow-shed.git","description":"A gas-efficient, address-bound account abstraction for permissioned hooks on CoW Protocol","language":"Solidity","stars":16,"topics":["contracts","cow-protocol","defi","solidity"],"license":"GPL-3.0","category":"blockchain-web3","readme_excerpt":"cow-shed COWShed is a user owned ERC1967 proxy deployed at a determininstic address using create2 with the user address as the salt . This deterministic deployment allows users to set the proxy address as the receiver for cowswap orders with pre/post hooks. At the first execution of hooks, the proxy gets deployed for the user and the hooks are executed. User signs a EIP712 message for the pre/post hooks which gets validated and only user signed hooks are executed on the user's proxy. This allows users to confidently perform permissioned actions in the hooks like: 1. transferring assets from the proxy to someone else. 2. use the proxy to add collateral or repay debt on a maker CDP or a aave debt position, etc. The signed message type looks like: The EOA signatures are expected to be 65 bytes long and to be encoded as abi.encodePacked(r, s, v) . Nonces are used to ensure signed hooks are only executed once and they also allow users to revoke the signed hooks in case they want to. And users must manage them. The nonces are not constrained to be sequential, so multiple orders with hooks can be executed out of order, but still validated. However, nonces are implemented using a bitmap. And sequential nonces will save some gas. The system also support smart contracts. In case of contracts, EIP1271 signatures are used to authenticate the signed hooks. Usage Deployments As cow-shed makes use of determinstic deployment, it has the same deployment address across all EVM-compatible chain","default_branch":null,"files":null,"tree":[],"storefront":"/r/cowdao-grants","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/cowdao-grants/cow-shed/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}