Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(edits): UMA Extension Edits #157

Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@ if (process.env.INTEGRATIONTEST) {
ethers.utils.parseEther("10").toHexString(),
]);
identifierWhitelist = identifierWhitelist.connect(whitelistOwner);
minimumBond = await optimisticOracleV3.getMinimumBond(collateralAssetAddress);
console.log("minimumBond", minimumBond.toString());

// minimumBond = await optimisticOracleV3.getMinimumBond(collateralAssetAddress);
// console.log("minimumBond", minimumBond.toString());
minimumBond = ether(140);

integrationRegistry = IntegrationRegistry__factory.connect(
contractAddresses.setFork.integrationRegistry,
Expand Down Expand Up @@ -178,7 +180,7 @@ if (process.env.INTEGRATIONTEST) {
productSettings = {
collateral: collateralAssetAddress,
liveness,
bondAmount: BigNumber.from(1000),
bondAmount: ether(140),
identifier,
optimisticOracleV3: optimisticOracleV3.address,
};
Expand Down Expand Up @@ -412,7 +414,7 @@ if (process.env.INTEGRATIONTEST) {
{
collateral: collateralAssetAddress,
liveness,
bondAmount: BigNumber.from(0),
Copy link
Collaborator

Choose a reason for hiding this comment

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

@pblivin0x Normally this should work with 0 bondAmount as well as we are comparing it against the minimumBond as returned by the oracle for a given collateral token.
However it seems that the oracle returns a minimum bond of "0" for INDEX which we should raise / double check with the UMA team.

See:

function _pullBond(OptimisticRebalanceParams memory optimisticRebalanceParams) internal returns (uint256) {

bondAmount: ether(140),
identifier,
optimisticOracleV3: optimisticOracleV3Mock.address,
},
Expand Down Expand Up @@ -447,7 +449,7 @@ if (process.env.INTEGRATIONTEST) {
{
collateral: collateralAssetAddress,
liveness,
bondAmount: BigNumber.from(0),
bondAmount: ether(140),
identifier,
optimisticOracleV3: optimisticOracleV3Mock.address,
},
Expand Down