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

Handle invalid responses #115

Merged
merged 3 commits into from
Oct 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _blacklist(self) -> Optional[str]:
if self.synchronized_data.is_mech_price_set:
# impose a penalty equivalent to the mech's price on the tool responsible for blacklisting the market
tool_idx = self.synchronized_data.mech_tool_idx
penalty = -self.synchronized_data.mech_price
penalty = -self.wei_to_native(self.synchronized_data.mech_price)
Copy link
Collaborator Author

@Adamantios Adamantios Oct 26, 2023

Choose a reason for hiding this comment

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

Unrelated to the PR.
The penalty should be in xDAI as the rewards are also given in this scale.

self.policy.add_reward(tool_idx, penalty)

return serialize_bets(bets)
Expand Down