- User calls
lockRevenue(taskId, hardwareId, numHours)
- Make sure the User approves spending token first
- The Auction Engine will assign the task to a Computing Provider (CP), calling
assignTask(taskId, cpAddress, collateral)
- The CP will lock the collateral in the contract, calling
lockCollateral(taskId)
- Make sure the CP approves spending token first
- The task time will start (
block.timestamp + duration
)
- Either party can call
terminateTask(taskId)
- If the User terminates the task, the CP will be paid for time completed
- If the CP terminates the task, the User will be returned the revenue and the CP will have its collateral slashed
- The Monitoring System will report the task as completed after the taskDeadline, giving the User 3 days to submit a refund Claim
- Any submitted claim will go through a verification process
- After the 3 days (assuming no claim was made), the CP can call
collectRevenue(taskId)
to collect the revenue + collateral
-
Notifications
You must be signed in to change notification settings - Fork 3
Lagrange DAO Computing Contracts
License
lagrangedao/smart-contract
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Lagrange DAO Computing Contracts
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published