Skip to content

Expenditures extension, utilities, updates - #1045

Merged
area merged 59 commits into
developfrom
maint/expenditures-2
Aug 5, 2022
Merged

area merged 59 commits into
developfrom
maint/expenditures-2

Conversation

@kronosapiens

@kronosapiens kronosapiens commented May 11, 2022

Copy link
Copy Markdown
Contributor

Closes #1042

  • Add StakedExpenditure for creating expenditures via stakes, and reclaiming or slashing stakes

Also:

  • Add a new moveFundsBetweenPots which accept arrays of tokens & amounts
  • Add a refundDomain private function which returns excess funding back to the domain on claiming of payment
  • Add a setExpenditureValues function which can change all expenditure values in one transaction, for owners
  • Add a setExpenditurePayout function to update slot payouts with correct bookkeeping, for arbitrators

The introduction of setExpenditurePayout addresses a bug in the existing implementation, where using setExpenditureState to update payouts would allow the funding pot bookkeeping to fall out of sync. setExpenditurePayout as an arbitration function provides an alternative for arbitrators (with an eye towards motions) to update payouts with correct bookkeeping. This introduction has necessitated an update to VotingReputation to correctly handle both types of expenditure state changes.

@kronosapiens
kronosapiens force-pushed the maint/expenditures-2 branch 3 times, most recently from 75b91ff to 27f50b4 Compare May 12, 2022 21:14
@kronosapiens
kronosapiens force-pushed the maint/expenditures-2 branch 3 times, most recently from 558f8bc to 7895b5e Compare May 13, 2022 20:12
@kronosapiens
kronosapiens force-pushed the maint/expenditures-2 branch from 5d2198e to f520243 Compare May 25, 2022 04:49
@kronosapiens
kronosapiens force-pushed the maint/expenditures-2 branch 3 times, most recently from d15bad5 to a1354bb Compare May 26, 2022 16:52
@arrenv arrenv mentioned this pull request May 27, 2022
11 tasks
@kronosapiens
kronosapiens force-pushed the maint/expenditures-2 branch 7 times, most recently from 51daa24 to 377d00e Compare June 7, 2022 22:33
@kronosapiens
kronosapiens force-pushed the maint/expenditures-2 branch from 377d00e to 758a208 Compare June 8, 2022 13:07
@kronosapiens

kronosapiens commented Jun 9, 2022

Copy link
Copy Markdown
Contributor Author

Regarding the slashing rep, I'll add an option to do so to the slashStake function.

I also think a cancelExpenditureAndSlashStake function which uses arbitration to cancel the stake & punish the creator in one go could be useful from a motions perspective. Thoughts? I was thinking through the specific flow... do we expect the slashing to occur while the expenditure is in the locked state? I suppose once the stake is slashed, there's no reason to go ahead and cancel the expenditure itself... unless to reclaim funds? Should we make cancelling the expenditure a part of the slash flow? Or include a boolean to that effect? That might be the move IMO.

Regarding the claim delays, that would require a v3 of the voting contract (since we'll be moving to a new way of accounting for claim delays), which I'd like to put into a separate PR. It may even be worth going back and finishing off #915 which includes this change.

@kronosapiens
kronosapiens force-pushed the maint/expenditures-2 branch 2 times, most recently from a26e3a8 to ff9b601 Compare June 9, 2022 20:47
@arrenv

arrenv commented Jun 10, 2022

Copy link
Copy Markdown
Member

@area @kronosapiens You are correct. The expected flow is that slashing should occur when the Expenditure is cancelled, at any time after it has been put into a locked state.

The penalty makes sense to be configurable by a Colony when installing the extension.

@kronosapiens
kronosapiens force-pushed the maint/expenditures-2 branch from ff9b601 to 0f16ecf Compare June 10, 2022 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expenditures Extension Brief

2 participants