Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Support complex-path for wsteth #67

Merged
merged 1 commit into from
Aug 8, 2022
Merged

Conversation

talbaneth
Copy link
Contributor

This is using the new callee for wsteth.

Copy link
Contributor

@godsflaw godsflaw left a comment

Choose a reason for hiding this comment

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

I ran and simulated an WSTETH-A and WSTETH-B liquidation. One problem did arise, after the first run, I received this error for WSTETH-A, but it was resoled on restart:

Checking auction opportunities for WSTETH-A
(node:38433) UnhandledPromiseRejectionWarning: Error: value out-of-bounds (argument=null, value=-5, code=INVALID_ARGUMENT, version=abi/5.3.0)
    at Logger.makeError (/home/satoshi/src/makerdao/auction-demo-keeper/node_modules/@ethersproject/logger/lib/index.js:187:21)
    at Logger.throwError (/home/satoshi/src/makerdao/auction-demo-keeper/node_modules/@ethersproject/logger/lib/index.js:196:20)
    at Logger.throwArgumentError (/home/satoshi/src/makerdao/auction-demo-keeper/node_modules/@ethersproject/logger/lib/index.js:199:21)
    at NumberCoder.Coder._throwError (/home/satoshi/src/makerdao/auction-demo-keeper/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js:41:16)
    at NumberCoder.encode (/home/satoshi/src/makerdao/auction-demo-keeper/node_modules/@ethersproject/abi/lib/coders/number.js:46:18)
    at /home/satoshi/src/makerdao/auction-demo-keeper/node_modules/@ethersproject/abi/lib/coders/array.js:74:19
    at Array.forEach (<anonymous>)
    at Object.pack (/home/satoshi/src/makerdao/auction-demo-keeper/node_modules/@ethersproject/abi/lib/coders/array.js:60:12)
    at TupleCoder.encode (/home/satoshi/src/makerdao/auction-demo-keeper/node_modules/@ethersproject/abi/lib/coders/tuple.js:71:24)
    at AbiCoder.encode (/home/satoshi/src/makerdao/auction-demo-keeper/node_modules/@ethersproject/abi/lib/abi-coder.js:93:15)
(node:38433) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
Already processing opportunities for WSTETH-B

I was able to kick off a WSTETH-B auction right restart and the same error also occurred, also resolved by a keeper restart. I'm able to reproduce it sometimes by resetting the entire simulation, going to try and track this down.

@@ -191,13 +191,15 @@ export default class Clipper {
[this._collateral, Config.vars.dai]
]);
} else if (exchangeCalleeAddress === Config.vars.collateral[this._collateralName].wstETHCurveUniv3Callee) {
const route = this.encodeUniv3Route()
Copy link
Contributor

Choose a reason for hiding this comment

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

I cannot reproduce now, and the error trace would indicate we have a problem with the route coming back here as that gets thrown into the abi encoder, and is the only thing that changed. That being said, if we have some problem here, we have it in the other codepaths too. I'm inclined to say, there is something here, but not related to this PR.

Copy link
Contributor

@godsflaw godsflaw left a comment

Choose a reason for hiding this comment

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

simulations look good, approved!

@godsflaw godsflaw merged commit b84f313 into godsflaw-20220527 Aug 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants