-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: arbitrage-agent #11
Conversation
function swap(address token, uint256 amount) external; | ||
} | ||
|
||
interface TokenLike { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we inherent an erc standard here instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we could replace TokenLike
with ERC20
probably. @Alexangelj ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few comments:
- I don't see any tests, could we have tests made when we have big functionality like this?
- The agent is responsible for its own smart contract, executing logic against the smart contract, and hooking into the sim. These are all things I think my box-core can eventually be responsible for, but for now this works and it's simple
- Really hate committing bindings
On the bindings, sort of unrelated to this pr and dont expect us to make this for this pr but an idea I just thought of:
- builder pattern for a smart contract (i.e. exchange) in rust, where we have a method "add_function" and it will add the respective abi to the restultant smart contract object. Then we don't need the bindings all the time, we just explicitly define the abi for a method (could use alloy-core maybe for that), then add it via the builder pattern. We still get self.exchange.status() or whatever method without worrying about bindings.
…tivefinance/portfolio-in-a-box into colin/feat/arbitrage-agent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should merge this in and itterate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like its branched off @clemlak 's branch, can we change the target to that branch or block this from being merged until that's in first?
@Alexangelj seems like Clement's branch got in and now this one is updated. Should be good to go. |
Need review from @kinrezC |
Merge after #21
Aiming to close #1.
Currently: