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

Fix redeem amount #105

Merged
merged 2 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 5 additions & 5 deletions packages/packages.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"dev": {
"skill/valory/market_manager_abci/0.1.0": "bafybeidnqerwkljbjgog73qaa5duu5ymsfjs6jsszeupseshx7go3n6afq",
"skill/valory/decision_maker_abci/0.1.0": "bafybeib2ipy6vo3mu2hzmgemvdrf63aczejgza7hqxfk4vb4ebjonwbma4",
"skill/valory/trader_abci/0.1.0": "bafybeic5uljeduzndpw3t32xwm65l7h7bk7vbqvir5ilvkevfucyfo6t4u",
"skill/valory/decision_maker_abci/0.1.0": "bafybeig6uwfzidjfpbrqfzeq7rdgfodsr2x65rvdbw6u7rq7skoubln55a",
"skill/valory/trader_abci/0.1.0": "bafybeihcewbmurwzt73foyyzooqisvfzirr4ey4cbyxdgvmmt2njoy6aly",
"contract/valory/market_maker/0.1.0": "bafybeidaz4dol7qsrwitw5jwasjtvd2vtlxhxizwkzen5kurblwacz4biu",
"agent/valory/trader/0.1.0": "bafybeigog4gb35dezhkamaudoo45572ecunsgo2av33baojyg7dye2zvoa",
"service/valory/trader/0.1.0": "bafybeifdh22wk63xn6xi43mxlo3lxkbmnz2rv4eqpvnamhaeribpwjlba4",
"agent/valory/trader/0.1.0": "bafybeifqfo2j7cvprqehsao3xtoovtgdoml6g6tuowwphxj43yksxbq2dy",
"service/valory/trader/0.1.0": "bafybeidsco3g7acsp62rwcd323vw4dfq5qlgovbygoniardgm64dxrrl6i",
"contract/valory/erc20/0.1.0": "bafybeid6p64a6tnovatbwybc6ocdd4u7bqkxsb4ks52rvf7ozcxxl6iaf4",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeihqeeiehyr3wgruyia4izbp75qz6rilcvbbc6ceb5o4jtvwqzboyy",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeie5tsuvx3pcv6zxlw253bjguhhe5bpy3j22w672wot42i5bciz2qm",
"contract/valory/mech/0.1.0": "bafybeiddc6pgurpyja2k64wzsb3jgcvl254s7rplgt5iooftsyfalqlbfq",
"contract/valory/realitio/0.1.0": "bafybeibzyfaeaxgyqnygtduhprs47fhtskh2vnmw2cvpemqhkgc72q4wpm",
"contract/valory/realitio_proxy/0.1.0": "bafybeibvndq6756qck7forgeavhdbn6ykgqs2ufyg7n5g6qdfpveatxuwy",
Expand Down
6 changes: 3 additions & 3 deletions packages/valory/agents/trader/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ skills:
- valory/reset_pause_abci:0.1.0:bafybeigeoc363gv3wp2rrmk6p2fdxney33nxd3owtpfugzapgruwe4klyu
- valory/termination_abci:0.1.0:bafybeigqpij2sgrpnilqjljfciixop4fldq5qceixc7534q6af4potdmdm
- valory/transaction_settlement_abci:0.1.0:bafybeia7rzsbea3ch4gcafyp3z6uvqh4npws2xpdwbkkdbrqqpjops7nui
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeihqeeiehyr3wgruyia4izbp75qz6rilcvbbc6ceb5o4jtvwqzboyy
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeie5tsuvx3pcv6zxlw253bjguhhe5bpy3j22w672wot42i5bciz2qm
- valory/market_manager_abci:0.1.0:bafybeidnqerwkljbjgog73qaa5duu5ymsfjs6jsszeupseshx7go3n6afq
- valory/decision_maker_abci:0.1.0:bafybeib2ipy6vo3mu2hzmgemvdrf63aczejgza7hqxfk4vb4ebjonwbma4
- valory/trader_abci:0.1.0:bafybeic5uljeduzndpw3t32xwm65l7h7bk7vbqvir5ilvkevfucyfo6t4u
- valory/decision_maker_abci:0.1.0:bafybeig6uwfzidjfpbrqfzeq7rdgfodsr2x65rvdbw6u7rq7skoubln55a
- valory/trader_abci:0.1.0:bafybeihcewbmurwzt73foyyzooqisvfzirr4ey4cbyxdgvmmt2njoy6aly
default_ledger: ethereum
required_ledgers:
- ethereum
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/services/trader/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
fingerprint:
README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq
fingerprint_ignore_patterns: []
agent: valory/trader:0.1.0:bafybeigog4gb35dezhkamaudoo45572ecunsgo2av33baojyg7dye2zvoa
agent: valory/trader:0.1.0:bafybeifqfo2j7cvprqehsao3xtoovtgdoml6g6tuowwphxj43yksxbq2dy
number_of_agents: 4
deployment: {}
---
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/skills/decision_maker_abci/redeem_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def is_winning(self) -> bool:
@property
def claimable_amount(self) -> int:
"""Get the claimable amount of the current market."""
amount = int(self.outcomeTokenMarginalPrice * self.outcomeTokensTraded)
amount = self.outcomeTokensTraded
Copy link
Collaborator Author

@Adamantios Adamantios Oct 6, 2023

Choose a reason for hiding this comment

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

The previous calculation resulted in the number of conditional tokens instead of the amount in WEI.

if self.is_winning:
return amount
return -amount
2 changes: 1 addition & 1 deletion packages/valory/skills/decision_maker_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fingerprint:
models.py: bafybeidlis33rkpvtb2w6qrtmiqzb4tbqfolkbbs6hk3jcx73lfuwqif3e
payloads.py: bafybeic4iz6uxinqpaxnefkadnzaox23y7k57zawnnkeovplih36v5cchy
policy.py: bafybeiftviqwq6lapfxj6ykxyh64z72vauqrgmsoho7zo2lvsdvu32kw3m
redeem_info.py: bafybeihtbundd75a4wdk2d23smvdjlh7fsv42ff2cwwuwgkyyxjciobwca
redeem_info.py: bafybeibddfxwp3577c3dl2utaowwltquu5fg6crezpumoebw563wxpbfrm
rounds.py: bafybeihopxmhzrpipc6r5x2vqf2tcixzuf5xdpqfsr7gr3n756n3ssft5q
states/__init__.py: bafybeid23llnyp6j257dluxmrnztugo5llsrog7kua53hllyktz4dqhqoy
states/base.py: bafybeibx3kn2b3rovyiowjzpwhspjdbzyfroequg7zsjqsbdh5cyowu72a
Expand Down
4 changes: 2 additions & 2 deletions packages/valory/skills/trader_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ skills:
- valory/transaction_settlement_abci:0.1.0:bafybeia7rzsbea3ch4gcafyp3z6uvqh4npws2xpdwbkkdbrqqpjops7nui
- valory/termination_abci:0.1.0:bafybeigqpij2sgrpnilqjljfciixop4fldq5qceixc7534q6af4potdmdm
- valory/market_manager_abci:0.1.0:bafybeidnqerwkljbjgog73qaa5duu5ymsfjs6jsszeupseshx7go3n6afq
- valory/decision_maker_abci:0.1.0:bafybeib2ipy6vo3mu2hzmgemvdrf63aczejgza7hqxfk4vb4ebjonwbma4
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeihqeeiehyr3wgruyia4izbp75qz6rilcvbbc6ceb5o4jtvwqzboyy
- valory/decision_maker_abci:0.1.0:bafybeig6uwfzidjfpbrqfzeq7rdgfodsr2x65rvdbw6u7rq7skoubln55a
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeie5tsuvx3pcv6zxlw253bjguhhe5bpy3j22w672wot42i5bciz2qm
behaviours:
main:
args: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ contracts: []
protocols: []
skills:
- valory/abstract_round_abci:0.1.0:bafybeih2fyfb6kkf7r45pvdk7pyyebr5xloia4xiqxtb3qsrasnstqmepq
- valory/decision_maker_abci:0.1.0:bafybeib2ipy6vo3mu2hzmgemvdrf63aczejgza7hqxfk4vb4ebjonwbma4
- valory/decision_maker_abci:0.1.0:bafybeig6uwfzidjfpbrqfzeq7rdgfodsr2x65rvdbw6u7rq7skoubln55a
behaviours:
main:
args: {}
Expand Down