[Reposted from FVM Forum] How to Data DAO: the client contract primitive #594
trruckerfling
started this conversation in
Developers
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
[OP @ZenGround0, Nov 2022]
As of Jan 2022, the FVM Forum will be merging into the Filecoin Community Discussion here, as FVM and Filecoin often go hand-in-hand for builders
Update in Jan 2023: an alternative to the Client Contract is the Deal Bounty Contract which is a good option to allow miners to publish storage deals with a client account as miners cannot do so with client contracts just yet.
Client contracts are user defined contracts that make deals with the builtin storage market directly. They can be used to make data DAOs and other programmable storage projects.
A basic client contract written in solidity is found here: GitHub - lotus-web3/client-contract: Solidity contract for making deals with the builtin market. Take a look at the README for a thorough explanation of this pattern and how to get started building with it.
In summary the basic architecture of the client contract programmable storage model looks like this . A storage provider publishes a deal with the storage market as happens in filecoin today. However instead of just checking the signature the market actor can call an arbitrary client contract to authorize that the deal is valid. In other words the contract is the client.
Clients can render payments directly through the builtin market payment mechanism, the FIL+ mechanism also supported by the builtin market, or through innovative new approaches. By specifying different policies to accept deals client contracts can potentially be used for lots of interesting applications: data DAOs, perpetual storage contracts, new markets of computational resources etc. For more ideas see this list of potential extensions GitHub - lotus-web3/client-contract: Solidity contract for making deals with the builtin market
Note that this behavior is supported by builtin actors as of FIP 44 which is landing in a few weeks on mainnet. Once fevm is deployed in 2023 user contracts will immediately be able to use this feature and client contracts will become a reality.
Beta Was this translation helpful? Give feedback.
All reactions