AssestReserve's governed APIs are mis-configured #7072
Labels
bug
Something isn't working
Inter-protocol
Overarching Inter Protocol
vaults_triage
DO NOT USE
Vaults
VaultFactor (née Treasury)
Milestone
Describe the bug
While refactoring AssetReserve to remove AMM dependencies (#7055), I became suspicious of the way the reserve configures its governed APIs. After the removal the only governed API will be
burnFeesToReduceShortfall
.I think there's a problem in
contractHelper.js
.makeFarGovernorFacet
takesgovernedApis
as a parameter, butmakeGovernorFacet
does not, which means it can't addgetGovernedApis()
orgetGovernedApiNames()
to thecreatorFacet
. In addition, AssetReserve doesn't includegovernedApis
in its call tomakeVirtualGovernorFacet
.fluxAggregatorContract.js
shows an example of how to do it.To Reproduce
test-reserve verifies that
burnFeesToReduceShortfall
can be called, but it's using thepuppetContractGovernor
, which cheats. I verified it usingtest-gov-collateral
, which configures a real AssetReserve. I inserted a debugger statement incontractGovernor.js
to verify that ininitApiGovernance
getGovernedNames returns ["burnFeesToReduceShortfall"], but
governedApis` is empty.Expected behavior
governance should be able to invoke
burnFeesToReduceShortfall
The text was updated successfully, but these errors were encountered: