Limit Order fixes - #22
Open
dkuthoore wants to merge 199 commits into
Open
Conversation
…pp-with-wallet-connection Add Vite + React frontend for Safe + Optimistic Governor deployment
…-config-module Add frontend ABIs and Safe/OG default config with identifier encoding
…section-to-readme.md Add Web Frontend documentation to README
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Bumps [h3](https://github.com/h3js/h3) from 1.15.4 to 1.15.5. - [Release notes](https://github.com/h3js/h3/releases) - [Changelog](https://github.com/h3js/h3/blob/v1.15.5/CHANGELOG.md) - [Commits](h3js/h3@v1.15.4...v1.15.5) --- updated-dependencies: - dependency-name: h3 dependency-version: 1.15.5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.21...4.17.23) --- updated-dependencies: - dependency-name: lodash dependency-version: 4.17.23 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [hono](https://github.com/honojs/hono) from 4.11.4 to 4.11.7. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](honojs/hono@v4.11.4...v4.11.7) --- updated-dependencies: - dependency-name: hono dependency-version: 4.11.7 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: John Shutt <[email protected]>
…/frontend/h3-1.15.5 Bump h3 from 1.15.4 to 1.15.5 in /frontend
…/frontend/lodash-4.17.23 Bump lodash from 4.17.21 to 4.17.23 in /frontend
…/frontend/hono-4.11.7 Bump hono from 4.11.4 to 4.11.7 in /frontend
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Clarify the role of agents in the commitment process.
Signed-off-by: John Shutt <[email protected]>
… BUY trade instead of first activity event Signed-off-by: John Shutt <[email protected]>
…posalHash output backward compatible Signed-off-by: John Shutt <[email protected]>
… is closed out Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
…nctions instead of reimplementing Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
…ansactions Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
…re implementation Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
…if using relayer Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
…layer mode Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
Signed-off-by: John Shutt <[email protected]>
copy trading agent and various polymarket improvements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses the remaining review comments from #20:
(1) enforce the price limit predicate in
validateToolCallsbefore approving swaps;(2) enforce the SMA predicate in the SMA variant;
(3) set the hydration lock only after a successful
ProposalExecutedlog fetch so failed fetches are retried. It also adds a validity guard for SMA and price data in the limit-order-sma agent.Changes
1. Enforce limit predicate (limit-order)
agent-library/agents/limit-order/agent.js: AddedLIMIT_PRICE_USD = 2000and a price check invalidateToolCallsbeforevalidated.push. FetchesethPriceUSDvia Chainlink (with CoinGecko fallback) and throws ifethPriceUSD > LIMIT_PRICE_USD.2. Enforce SMA predicate (limit-order-sma)
agent-library/agents/limit-order-sma/agent.js: InvalidateToolCalls, beforevalidated.push, fetchesethPriceUSDandsmaEth200USDfromfetchEthPriceDataFromCoinGecko()and throws ifethPriceUSD > smaEth200USD. Adds a validity guard that throws ifsmaEth200USDorethPriceUSDis null, undefined, or not finite before the comparison.3. Defer hydration lock until log fetch succeeds
agent-library/agents/limit-order/agent.jsandagent-library/agents/limit-order-sma/agent.js: InreconcileProposalSubmission, movedhydratedFromChain = truefrom before thegetLogscall to after it (inside thetryblock). IfgetLogsthrows, hydration is not marked complete and the next poll retries.