Skip to content

Better Vault Value checker interface #1201

@DanielVF

Description

@DanielVF

Right now the vault vault checker, used to verify that no MEV has happened strategist allocations, the checks the upper and lower bound of allowed totalSupply and vaultValue. This is safe, and safer that what we had before, but has two disadvantages.

The metastrategy creates or removes large amounts of OUSD during moves in and out. The amount of these changes can be affected by other users in the curve pools, and can dwarf the actual profit and loss. Because of this, an unrelated trade in the OUSD/3pool can drastically change the amounts, and cause a previously valid strategist allocation transaction to fail the checks.

Secondly, the parameters are a little bit of a pain to check. For example, the last allocation looked like this:

(
-1378302004686863985848902,  // Low value change
-1376802004686863985848902,  // High value change
-1378399395878459980498569,  // Low supply change
-1376899395878459980498569,  // High supply change
)

This does show that we are thinking about roughly a 1.3 million reduction in supply from moving funds out of the metastrategy, but makes it extremely difficult to see the far more important expected profit/loss of the move, and is very sensitive to metastrategy changes.

An alternate API for the vault value checker might be:

(
-200, // Expect to lose 200 dollars on these allocations
100, // We are okay with a +- 100 dollar difference between expected and actual PL. 
-1,378,000, // Vault value is expected to go down by 1.3 million
100,000 // We are okay with a +- 100,000  on the expected combined vault value / total supply change.
)

Metadata

Metadata

Assignees

Labels

P2Small number of users are affected, major cosmetic issuecontractsWorks related to contractsenhancementNew feature or requestgood first issueGood for newcomersplannedIn-scope at the beginning of the sprint

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions