Skip to content

SnapshotDelegator#126

Merged
Joeysantoro merged 3 commits intofeat/IndexOTCfrom
feat/SnapshotDelegator
Aug 12, 2021
Merged

SnapshotDelegator#126
Joeysantoro merged 3 commits intofeat/IndexOTCfrom
feat/SnapshotDelegator

Conversation

@Joeysantoro
Copy link
Contributor

@Joeysantoro Joeysantoro commented Aug 12, 2021

To vote on snapshot, you need a private key, therefore contracts are excluded.

In order to use the INDEX from the potential OTC deal, we'd need to use the snapshot delegate registry to appoint a proxy EOA. https://docs.snapshot.org/guides/delegation

This PR introduces a snapshot delegator PCV deposit with the following features:

  • delegation
  • Optimistic approval admin support for re-delegation
  • Guardian support for undelegation

It also updates the indexOTC DAO proposal with a transfer of INDEX from the DAO to the snapshotDelegator

Copy link

@GNSPS GNSPS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't get why this is important for the threat model:

To vote on snapshot, you need a private key, therefore contracts are excluded.

And I kind of disagree with the "optimistic" nomenclature here:

Optimistic approval admin support for re-delegation

Because in my mind "optimistic" approval kind of requires an automatic fraud-proof-like system that can be initiated by any actor, as opposed to having to be revoked through a DAO vote (i.e., a subjective, more prolonged interaction).

Overall the contract LGTM. These are mostly nitpicks.

/// @notice withdraw tokens from the PCV allocation
/// @param amountUnderlying of tokens withdrawn
/// @param to the address to send PCV to
function withdraw(address to, uint256 amountUnderlying)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's awkward to have a function that behaves exactly the same way as PCVDeposit::withdrawERC20 but with just more relaxed pre-conditions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the pause condition

@Joeysantoro Joeysantoro merged commit bbf2934 into feat/IndexOTC Aug 12, 2021
@xklob xklob deleted the feat/SnapshotDelegator branch September 19, 2021 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments