From dd3441ed8e5847f515f9147069fc4c2d1125ab4f Mon Sep 17 00:00:00 2001 From: Ardian Date: Wed, 7 Jun 2023 18:52:57 +0200 Subject: [PATCH 1/2] fix: address audit points --- packages/packages.json | 10 +++---- .../valory/agents/keep3r_bot/aea-config.yaml | 5 ++-- .../valory/services/keep3r_bot/service.yaml | 7 ++++- .../services/keep3r_bot_goerli/service.yaml | 2 +- packages/valory/skills/keep3r_abci/skill.yaml | 3 +- .../skills/keep3r_job_abci/behaviours.py | 28 +++++++++---------- .../valory/skills/keep3r_job_abci/models.py | 7 +++-- .../valory/skills/keep3r_job_abci/skill.yaml | 5 ++-- 8 files changed, 39 insertions(+), 28 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 35f55d2c..b71fb272 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -3,16 +3,16 @@ "contract/valory/keep3r_v1_library/0.1.0": "bafybeiguyavczsaebbh5docth3o6e36b24s46jynhvysewnk3hqim3a4qe", "contract/valory/keep3r_test_job/0.1.0": "bafybeibwxwdzws5ahlb7soxxoxxa7byhhoo6vyfn3hqds4m7y2ectsawbm", "contract/valory/keep3r_v1/0.1.0": "bafybeie4oivgk6ip4pgkrdcw2p4puxms6g5zs3pdhn7dytizayxoeiji5m", - "skill/valory/keep3r_job_abci/0.1.0": "bafybeib7dhenfvazn3npfp6g5s4b4ug7zghwsi4d2hvu6bnb7izap7hnny", - "skill/valory/keep3r_abci/0.1.0": "bafybeicmh73c7ncnyr6trhrg4acbcyb6l3igqwyiwfftsv5fqahwqj474m", - "agent/valory/keep3r_bot/0.1.0": "bafybeigkrckvy2m7uecswikhtli27xfvghifxirgxvkobsb2lwlsckk2ca", + "skill/valory/keep3r_job_abci/0.1.0": "bafybeicjrnci63pmlviccabjfbmnar7bgb23fcmrlu62heev5nlfudvokm", + "skill/valory/keep3r_abci/0.1.0": "bafybeic6jjpyhzhesby3nwb3466cadihbolt7yrfj3mkggcujffcklw64u", + "agent/valory/keep3r_bot/0.1.0": "bafybeigespsvcx5cfzl2ys2mjgd6qb43hijqfvrl2niqto6ftjlcv5t4ka", "contract/valory/keep3r_job/0.1.0": "bafybeiajy32pvqdzbecg2obmlnzdg756srtsmfzn4ujl5ybclx4hfvceli", "contract/valory/keep3r_v2/0.1.0": "bafybeifdya376uvb22otbkneinifqn5br3kjhmojqa42wsen2klt47477e", "contract/valory/deposit_manager_job/0.1.0": "bafybeic42aa5nsnpgomshy3jfs4sbkl76f3avl6liqbos4frewjsdf473y", "contract/valory/phuture_harvesting_job/0.1.0": "bafybeiadbv3duxjv72l6oaxbrt47y62skzl6mcnphqzsdmctbfuolbplti", "contract/valory/keep3r_my_job/0.1.0": "bafybeihusyezmkz5htukocahbde5rqqyk3yhwmmygbuax37crbpbr4gkoy", - "service/valory/keep3r_bot/0.1.0": "bafybeig3j72pvuebowmj6vxeyxaiopz7d74lxt3uelefns2kz5qkgp7guq", - "service/valory/keep3r_bot_goerli/0.1.0": "bafybeiazwp3zzhu33ycyq4bnwwtmaepn5fpgqd32623p5o6pk2spd3h66i", + "service/valory/keep3r_bot/0.1.0": "bafybeibc33rbahada7imdxmbq2bvhz6zy555u2iid6vd5wurcjfn4bk63i", + "service/valory/keep3r_bot_goerli/0.1.0": "bafybeicetbnxqywzas77sjwpqepqlazzzjpy7he3u3e2e4i3eknkmwzrk4", "contract/valory/yearn_factory_harvest_job/0.1.0": "bafybeiddtfwxnejyyiagfmz7q6isue2j5kskiluxk2z2hgbumjjiqshy2e", "protocol/valory/ledger_api/1.0.0": "bafybeigpn6ysm53qkcllkzgdwc5xxpxz32xn2zoux3phdm2i3yty2i3thu", "connection/valory/ledger/0.19.0": "bafybeigvml36q4ic2tstc25xli5qw7hacykyudkuywfmc7qjb5kwfzhkka", diff --git a/packages/valory/agents/keep3r_bot/aea-config.yaml b/packages/valory/agents/keep3r_bot/aea-config.yaml index c56bb216..5c4f4057 100644 --- a/packages/valory/agents/keep3r_bot/aea-config.yaml +++ b/packages/valory/agents/keep3r_bot/aea-config.yaml @@ -154,8 +154,8 @@ protocols: skills: - valory/abstract_abci:0.1.0:bafybeigte2l4en4otdp2maaoc3uesqdga5z4sqozrybsmcdp26bgfbcy54 - valory/abstract_round_abci:0.1.0:bafybeicx2f7q3wm6xllegizojx76y7jrwovttjgf7nbjs3w62x7jyffmum -- valory/keep3r_abci:0.1.0:bafybeicmh73c7ncnyr6trhrg4acbcyb6l3igqwyiwfftsv5fqahwqj474m -- valory/keep3r_job_abci:0.1.0:bafybeib7dhenfvazn3npfp6g5s4b4ug7zghwsi4d2hvu6bnb7izap7hnny +- valory/keep3r_abci:0.1.0:bafybeic6jjpyhzhesby3nwb3466cadihbolt7yrfj3mkggcujffcklw64u +- valory/keep3r_job_abci:0.1.0:bafybeicjrnci63pmlviccabjfbmnar7bgb23fcmrlu62heev5nlfudvokm - valory/registration_abci:0.1.0:bafybeihif5gzbil5pvfcgprawhi2zt5nc2bdgcx2vp5y3kzghwzeqzyxku - valory/reset_pause_abci:0.1.0:bafybeicjpupvkev72gtjrehnpao6dsmmgmk6izsyeyyuthmckisqdq576e - valory/termination_abci:0.1.0:bafybeihqimzr5ojkoflvuhy35ubwjyk3t2u5xwwsufoolzqwvkukl7gnxy @@ -233,6 +233,7 @@ models: max_healthcheck: ${int:1200} service_registry_address: ${str:0x9Ab4D43e5C4AD67C109716B716062F78eecb7995} share_tm_config_on_startup: ${bool:false} + slippage_tolerance: ${float:0.05} tendermint_p2p_url: ${str:localhost:26656} use_v2: ${bool:true} bonding_asset: ${str:0x0000000000000000000000000000000000000000} diff --git a/packages/valory/services/keep3r_bot/service.yaml b/packages/valory/services/keep3r_bot/service.yaml index 9e4c6a59..1947cbdc 100644 --- a/packages/valory/services/keep3r_bot/service.yaml +++ b/packages/valory/services/keep3r_bot/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeig26ntff2vdtmum3crflwqrybmonwdxahvlrst2brnazbo3mjvtqu fingerprint_ignore_patterns: [] -agent: valory/keep3r_bot:0.1.0:bafybeigkrckvy2m7uecswikhtli27xfvghifxirgxvkobsb2lwlsckk2ca +agent: valory/keep3r_bot:0.1.0:bafybeigespsvcx5cfzl2ys2mjgd6qb43hijqfvrl2niqto6ftjlcv5t4ka number_of_agents: 1 deployment: tendermint: @@ -36,6 +36,7 @@ extra: on_chain_service_id: ${ON_CHAIN_SERVICE_ID:int:null} share_tm_config_on_startup: ${USE_ACN:bool:false} sleep_time: ${SLEEP_TIME:int:3} + slippage_tolerance: ${SLIPPAGE_TOLERANCE:float:0.05} use_termination: ${USE_TERMINATION:bool:false} use_flashbots: ${USE_FLASHBOTS:bool:true} reset_tendermint_after: ${RESET_TENDERMINT_AFTER:int:2} @@ -63,6 +64,7 @@ extra: use_flashbots: ${USE_FLASHBOTS:bool:true} reset_tendermint_after: ${RESET_TENDERMINT_AFTER:int:2} supported_jobs_to_package_hash: ${JOBS_TO_HASH:list:[]} + slippage_tolerance: ${SLIPPAGE_TOLERANCE:float:0.05} keep3r_v1_contract_address: ${KEEP3R_V1_ADDRESS:str:0x1cEB5cB57C4D4E2b2433641b95Dd330A33185A44} keep3r_v2_contract_address: ${KEEP3R_V2_ADDRESS:str:0xeb02addCfD8B773A5FFA6B9d1FE99c566f8c44CC} use_v2: ${USE_KEEPER_V2:bool:true} @@ -86,6 +88,7 @@ extra: share_tm_config_on_startup: ${USE_ACN:bool:true} use_flashbots: ${USE_FLASHBOTS:bool:true} supported_jobs_to_package_hash: ${JOBS_TO_HASH:list:[]} + slippage_tolerance: ${SLIPPAGE_TOLERANCE:float:0.05} reset_tendermint_after: ${RESET_TENDERMINT_AFTER:int:2} keep3r_v1_contract_address: ${KEEP3R_V1_ADDRESS:str:0x1cEB5cB57C4D4E2b2433641b95Dd330A33185A44} keep3r_v2_contract_address: ${KEEP3R_V2_ADDRESS:str:0xeb02addCfD8B773A5FFA6B9d1FE99c566f8c44CC} @@ -110,6 +113,7 @@ extra: sleep_time: ${SLEEP_TIME:int:3} use_termination: ${USE_TERMINATION:bool:false} supported_jobs_to_package_hash: ${JOBS_TO_HASH:list:[]} + slippage_tolerance: ${SLIPPAGE_TOLERANCE:float:0.05} reset_tendermint_after: ${RESET_TENDERMINT_AFTER:int:2} keep3r_v1_contract_address: ${KEEP3R_V1_ADDRESS:str:0x1cEB5cB57C4D4E2b2433641b95Dd330A33185A44} keep3r_v2_contract_address: ${KEEP3R_V2_ADDRESS:str:0xeb02addCfD8B773A5FFA6B9d1FE99c566f8c44CC} @@ -133,6 +137,7 @@ extra: use_termination: ${USE_TERMINATION:bool:false} use_flashbots: ${USE_FLASHBOTS:bool:true} sleep_time: ${SLEEP_TIME:int:3} + slippage_tolerance: ${SLIPPAGE_TOLERANCE:float:0.05} reset_tendermint_after: ${RESET_TENDERMINT_AFTER:int:2} supported_jobs_to_package_hash: ${JOBS_TO_HASH:list:[]} keep3r_v1_contract_address: ${KEEP3R_V1_ADDRESS:str:0x1cEB5cB57C4D4E2b2433641b95Dd330A33185A44} diff --git a/packages/valory/services/keep3r_bot_goerli/service.yaml b/packages/valory/services/keep3r_bot_goerli/service.yaml index be27a3c0..18007749 100644 --- a/packages/valory/services/keep3r_bot_goerli/service.yaml +++ b/packages/valory/services/keep3r_bot_goerli/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeiblcg3qti2cyz4ytufdkmqzcm6svbo5cwgsu2srjovvljdi35iz6i fingerprint_ignore_patterns: [] -agent: valory/keep3r_bot:0.1.0:bafybeigkrckvy2m7uecswikhtli27xfvghifxirgxvkobsb2lwlsckk2ca +agent: valory/keep3r_bot:0.1.0:bafybeigespsvcx5cfzl2ys2mjgd6qb43hijqfvrl2niqto6ftjlcv5t4ka number_of_agents: 4 deployment: tendermint: diff --git a/packages/valory/skills/keep3r_abci/skill.yaml b/packages/valory/skills/keep3r_abci/skill.yaml index 1c44e6f3..740cfefa 100644 --- a/packages/valory/skills/keep3r_abci/skill.yaml +++ b/packages/valory/skills/keep3r_abci/skill.yaml @@ -21,7 +21,7 @@ contracts: [] protocols: [] skills: - valory/abstract_round_abci:0.1.0:bafybeicx2f7q3wm6xllegizojx76y7jrwovttjgf7nbjs3w62x7jyffmum -- valory/keep3r_job_abci:0.1.0:bafybeib7dhenfvazn3npfp6g5s4b4ug7zghwsi4d2hvu6bnb7izap7hnny +- valory/keep3r_job_abci:0.1.0:bafybeicjrnci63pmlviccabjfbmnar7bgb23fcmrlu62heev5nlfudvokm - valory/registration_abci:0.1.0:bafybeihif5gzbil5pvfcgprawhi2zt5nc2bdgcx2vp5y3kzghwzeqzyxku - valory/reset_pause_abci:0.1.0:bafybeicjpupvkev72gtjrehnpao6dsmmgmk6izsyeyyuthmckisqdq576e - valory/termination_abci:0.1.0:bafybeihqimzr5ojkoflvuhy35ubwjyk3t2u5xwwsufoolzqwvkukl7gnxy @@ -136,6 +136,7 @@ models: supported_jobs_to_package_hash: - - '0xaed599aadfee8e32cedb59db2b1120d33a7bacfd' - '0xaed599aadfee8e32cedb59db2b1120d33a7bacfd' + slippage_tolerance: 0.05 tendermint_check_sleep_delay: 3 tendermint_com_url: http://localhost:8080 tendermint_max_retries: 5 diff --git a/packages/valory/skills/keep3r_job_abci/behaviours.py b/packages/valory/skills/keep3r_job_abci/behaviours.py index 81db3c53..6710a78d 100644 --- a/packages/valory/skills/keep3r_job_abci/behaviours.py +++ b/packages/valory/skills/keep3r_job_abci/behaviours.py @@ -925,10 +925,10 @@ def _get_gas_spent(self) -> Generator[None, None, str]: """Get the gas spent for the latest unbonding interval.""" keeper_address = self.synchronized_data.safe_contract_address bonding_asset = self.params.k3pr_address - latest_unbonding_event = yield from self._get_latest_unbonding_event( + unbonding_events = yield from self._get_unbonding_events( keeper_address, bonding_asset ) - if latest_unbonding_event is None or latest_unbonding_event == self._NO_EVENT: + if unbonding_events is None or len(unbonding_events) == 0: # something went wrong, the keeper MUST have unbonded if we have reached this point return CalculateSpentGasRound.ERROR_PAYLOAD @@ -939,15 +939,18 @@ def _get_gas_spent(self) -> Generator[None, None, str]: # something went wrong return CalculateSpentGasRound.ERROR_PAYLOAD - # we start from the block the block in which the last withdraw event happened, or from the first block if we have - # never withdrawn + # the goal is to calculate the gas spent between the last two unbonding events + # we start from the block in which the last unbonding event happened + # in case there is no withdraw event, we start from block 0 + # in case there is a withdraw event, we start from second to last unbonding event + # the fact that there is a withdraw event means that the keeper has already unbonded at least twice from_block = ( 0 if latest_withdraw_event == self._NO_EVENT - else latest_withdraw_event["block_number"] + else unbonding_events[-2]["block_number"] ) # we end at the block in which the last unbonding event happened - to_block = latest_unbonding_event["block_number"] + to_block = unbonding_events[-1]["block_number"] transactions = yield from self._get_safe_txs( keeper_address, from_block, to_block @@ -987,9 +990,9 @@ def _get_latest_withdrawal_event( # events are sorted by block number return withdrawal_events[-1] - def _get_latest_unbonding_event( + def _get_unbonding_events( self, keeper_address: str, bonding_asset: str - ) -> Generator[None, None, Optional[Dict]]: + ) -> Generator[None, None, Optional[List[Dict]]]: """Get unbonding events""" unbonding_events = yield from self.read_keep3r( "get_unbonding_events", @@ -1000,13 +1003,9 @@ def _get_latest_unbonding_event( # something went wrong return None - if len(unbonding_events) == 0: - # return the empty dict to indicate no unbondings - return self._NO_EVENT - # return the latest unbonding event # events are sorted by block number - return unbonding_events[-1] + return unbonding_events def _get_safe_txs( self, safe_address: str, from_block: int, to_block: int @@ -1092,7 +1091,8 @@ def get_tx(self) -> Generator[None, None, str]: if min_eth_amount is None: # something went wrong return SwapAndDisburseRewardsRound.ERROR_PAYLOAD - + # apply slippage tolerance + min_eth_amount = int(min_eth_amount * (1 - self.params.slippage_tolerance)) multisend_txs: List[Dict[str, Any]] = [] # 1. get the withdraw transaction withdraw_tx = yield from self._get_withdraw_tx( diff --git a/packages/valory/skills/keep3r_job_abci/models.py b/packages/valory/skills/keep3r_job_abci/models.py index 274cebdb..85375675 100644 --- a/packages/valory/skills/keep3r_job_abci/models.py +++ b/packages/valory/skills/keep3r_job_abci/models.py @@ -21,6 +21,7 @@ from typing import Any, Dict, List, Type from aea.configurations.data_types import PublicId +from aea.exceptions import enforce from packages.valory.skills.abstract_round_abci.base import AbciApp from packages.valory.skills.abstract_round_abci.models import ApiSpecs, BaseParams @@ -89,9 +90,11 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: "curve_pool_contract_address", kwargs, str ) self.agent_surplus_share = self._ensure("agent_surplus_share", kwargs, float) + self.slippage_tolerance: float = self._ensure( + "slippage_tolerance", kwargs, float + ) multisend_address = kwargs.get("multisend_address", None) - if multisend_address is None: - raise ValueError("Multisend address not specified!") + enforce(multisend_address is not None, "Multisend address not specified!") self.multisend_address = multisend_address super().__init__(*args, **kwargs) diff --git a/packages/valory/skills/keep3r_job_abci/skill.yaml b/packages/valory/skills/keep3r_job_abci/skill.yaml index 8f0f7f92..0d5a4ae7 100644 --- a/packages/valory/skills/keep3r_job_abci/skill.yaml +++ b/packages/valory/skills/keep3r_job_abci/skill.yaml @@ -8,14 +8,14 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeidq32yfua6bopvzlo7xwpfdiz4bwr7txkv4vo4vxmjmvdthkr2cwe __init__.py: bafybeifr6ekniqkhuvkyfw3xktsntjvjjye5vfyir2i5zrzc3bcud5vvqa - behaviours.py: bafybeibpesvx2rcxswmotx2jbog2l4wxgfc23vonvw64x2qfbx45pjzxse + behaviours.py: bafybeif42ubq7yhfyclavz5r37u776spsbxyqlwypi3sbul3gbdhygdqva dialogues.py: bafybeidfvafboay732zd7ez4yblojbzohujfwtp3e5elit7ztenepk6q3a dynamic_package_loader.py: bafybeifdp6ym6jjjqbcu4qcg5vkh2kksvowryvrfcjbklvhvs36653troe fsm_specification.yaml: bafybeihjvacl6sclfyrntgqoxexfxjq2kfjeyc6whpo4wciynrs3plclxm handlers.py: bafybeiflkitcwl4b4glto7xaf7oykdsutbsyr62fwzh4ycy6grvblnypya io_/__init__.py: bafybeifxgmmwjqzezzn3e6keh2bfo4cyo7y5dq2ept3stfmgglbrzfl5rq io_/loader.py: bafybeidbnhostvbufwc4z2ulcgzw3weyps4obpnofkuglaehz2jpwstpbq - models.py: bafybeidz7o7j5y3paczwsfabqd3xyg2xca2wi6milyeyq7mssrekddkcuu + models.py: bafybeibssadyunjcvjowon33lft4f3qxsoo5cmc2v6sjlyt4rtyet3nxhy payloads.py: bafybeih4nbp77gimv4h3bcg3e7mutpb6h64ptzc3f5zmvw7kfpib3r2rs4 rounds.py: bafybeiausofail75f3ebjafjnibp6fhvmiangvk6bpm44yiee7p2knr4me tests/__init__.py: bafybeicw6vp5sxxwr5p3dns6of2px4qizw4q2s55ozf5cu5uamfh3tlrby @@ -149,6 +149,7 @@ models: supported_jobs_to_package_hash: - - '0xaed599aadfee8e32cedb59db2b1120d33a7bacfd' - '0xaed599aadfee8e32cedb59db2b1120d33a7bacfd' + slippage_tolerance: 0.05 tendermint_check_sleep_delay: 3 tendermint_com_url: http://localhost:8080 tendermint_max_retries: 5 From 3af12593b9db525638115f4acbfab35a155cc490 Mon Sep 17 00:00:00 2001 From: Ardian Date: Wed, 7 Jun 2023 18:57:47 +0200 Subject: [PATCH 2/2] chore: generators --- packages/packages.json | 30 +++++++++---------- .../valory/agents/keep3r_bot/aea-config.yaml | 25 ++++++++-------- .../valory/services/keep3r_bot/service.yaml | 2 +- .../services/keep3r_bot_goerli/service.yaml | 2 +- packages/valory/skills/keep3r_abci/skill.yaml | 12 ++++---- 5 files changed, 36 insertions(+), 35 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 35f55d2c..7d58aae0 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -3,39 +3,39 @@ "contract/valory/keep3r_v1_library/0.1.0": "bafybeiguyavczsaebbh5docth3o6e36b24s46jynhvysewnk3hqim3a4qe", "contract/valory/keep3r_test_job/0.1.0": "bafybeibwxwdzws5ahlb7soxxoxxa7byhhoo6vyfn3hqds4m7y2ectsawbm", "contract/valory/keep3r_v1/0.1.0": "bafybeie4oivgk6ip4pgkrdcw2p4puxms6g5zs3pdhn7dytizayxoeiji5m", - "skill/valory/keep3r_job_abci/0.1.0": "bafybeib7dhenfvazn3npfp6g5s4b4ug7zghwsi4d2hvu6bnb7izap7hnny", - "skill/valory/keep3r_abci/0.1.0": "bafybeicmh73c7ncnyr6trhrg4acbcyb6l3igqwyiwfftsv5fqahwqj474m", - "agent/valory/keep3r_bot/0.1.0": "bafybeigkrckvy2m7uecswikhtli27xfvghifxirgxvkobsb2lwlsckk2ca", + "skill/valory/keep3r_job_abci/0.1.0": "bafybeifvmw4pjfg7fxka7drr75ylyyorpudw2aoq5ahdjzbq2colgdzsly", + "skill/valory/keep3r_abci/0.1.0": "bafybeiansgj6kn27xze3v7p7s6tklwyoshhgywi3kfudd74nxdo2lnp4su", + "agent/valory/keep3r_bot/0.1.0": "bafybeidhut7yja7jtebe2b3nqbl5ld7nsr64igt74f5dmhjwymuwlhy4fa", "contract/valory/keep3r_job/0.1.0": "bafybeiajy32pvqdzbecg2obmlnzdg756srtsmfzn4ujl5ybclx4hfvceli", "contract/valory/keep3r_v2/0.1.0": "bafybeifdya376uvb22otbkneinifqn5br3kjhmojqa42wsen2klt47477e", "contract/valory/deposit_manager_job/0.1.0": "bafybeic42aa5nsnpgomshy3jfs4sbkl76f3avl6liqbos4frewjsdf473y", "contract/valory/phuture_harvesting_job/0.1.0": "bafybeiadbv3duxjv72l6oaxbrt47y62skzl6mcnphqzsdmctbfuolbplti", "contract/valory/keep3r_my_job/0.1.0": "bafybeihusyezmkz5htukocahbde5rqqyk3yhwmmygbuax37crbpbr4gkoy", - "service/valory/keep3r_bot/0.1.0": "bafybeig3j72pvuebowmj6vxeyxaiopz7d74lxt3uelefns2kz5qkgp7guq", - "service/valory/keep3r_bot_goerli/0.1.0": "bafybeiazwp3zzhu33ycyq4bnwwtmaepn5fpgqd32623p5o6pk2spd3h66i", + "service/valory/keep3r_bot/0.1.0": "bafybeihedjd4sz6pcqjj4ovyliccjeiywghc2lm2g3vc2pjh4k25dn5u7m", + "service/valory/keep3r_bot_goerli/0.1.0": "bafybeid7zdfcqi44eyhzellkbrtmdq7v4jxlu24tz2ny7mhvipu2gaqrui", "contract/valory/yearn_factory_harvest_job/0.1.0": "bafybeiddtfwxnejyyiagfmz7q6isue2j5kskiluxk2z2hgbumjjiqshy2e", "protocol/valory/ledger_api/1.0.0": "bafybeigpn6ysm53qkcllkzgdwc5xxpxz32xn2zoux3phdm2i3yty2i3thu", "connection/valory/ledger/0.19.0": "bafybeigvml36q4ic2tstc25xli5qw7hacykyudkuywfmc7qjb5kwfzhkka", - "skill/valory/abstract_round_abci/0.1.0": "bafybeicx2f7q3wm6xllegizojx76y7jrwovttjgf7nbjs3w62x7jyffmum", - "skill/valory/registration_abci/0.1.0": "bafybeihif5gzbil5pvfcgprawhi2zt5nc2bdgcx2vp5y3kzghwzeqzyxku", - "skill/valory/reset_pause_abci/0.1.0": "bafybeicjpupvkev72gtjrehnpao6dsmmgmk6izsyeyyuthmckisqdq576e", - "skill/valory/transaction_settlement_abci/0.1.0": "bafybeiavbytwahrflz4gqcvg7aoz7s6y3s7aytpt2cz2dm4owkxslqvnv4", - "skill/valory/termination_abci/0.1.0": "bafybeihqimzr5ojkoflvuhy35ubwjyk3t2u5xwwsufoolzqwvkukl7gnxy", + "skill/valory/abstract_round_abci/0.1.0": "bafybeiadrj2jzptjh6jals7rc7tp6vbv64fll5d5ich4tlr6t7eh5nqflq", + "skill/valory/registration_abci/0.1.0": "bafybeickxljqvum42oei3vntqbtsd77nevoxdv5ypy43hlous2bnsefpi4", + "skill/valory/reset_pause_abci/0.1.0": "bafybeifrjlalgcbb6zknkgxomfvgfqzmgi56hvcnjfplhlvrfou43epima", + "skill/valory/transaction_settlement_abci/0.1.0": "bafybeihwmzb2fsmemwxyzaou3p6j53br3jci2v66skp4nvge4mzvkx4t4u", + "skill/valory/termination_abci/0.1.0": "bafybeif2rm6wu2royxfeu4uefm6z323vrt5w5bawbqf3b3abaenpkrmyqi", "contract/valory/connext_propagate_job/0.1.0": "bafybeifa5kyg6wf4xh5lbj3hcyfvbo6mp7vhpzwum5yhf3uwbqadzjtw24", "contract/valory/curve_pool/0.1.0": "bafybeiafzmhbhx4jysseaergr2o6larftssn543fweg5a47wo6n4mrsbke" }, "third_party": { "protocol/valory/abci/0.1.0": "bafybeig3dj5jhsowlvg3t73kgobf6xn4nka7rkttakdb2gwsg5bp7rt7q4", - "connection/valory/abci/0.1.0": "bafybeifpdzwpwntu2qu5qks22elglwozpwpwvihrhgw7sgyjpff7yye3za", + "connection/valory/abci/0.1.0": "bafybeifzhmuvaqj5mnib65u5cqbmfpixjkow6iuh43ofricdpwdtjwawya", "protocol/valory/contract_api/1.0.0": "bafybeidv6wxpjyb2sdyibnmmum45et4zcla6tl63bnol6ztyoqvpl4spmy", "protocol/valory/http/1.0.0": "bafybeifyoio7nlh5zzyn5yz7krkou56l22to3cwg7gw5v5o3vxwklibhty", "connection/valory/http_client/0.23.0": "bafybeidykl4elwbcjkqn32wt5h4h7tlpeqovrcq3c5bcplt6nhpznhgczi", - "contract/valory/gnosis_safe_proxy_factory/0.1.0": "bafybeieauenpdblyecnjorei2gbfatvgrxwoucigo6x3lksnhwknhawkqa", - "contract/valory/service_registry/0.1.0": "bafybeiegj2cbtyqkw42q3wlqm2opl43ddnp4snavbyllsokscqrp4icwfu", + "contract/valory/gnosis_safe_proxy_factory/0.1.0": "bafybeif3gj5a5n6humzzsc3hacmfvfdqltzo7ibc7vvtisv3ppmbzxbkui", + "contract/valory/service_registry/0.1.0": "bafybeigxkx7pcz7blgcxtuga6c2z3fmrarcisauskusc64xulujs342rcq", "protocol/open_aea/signing/1.0.0": "bafybeibqlfmikg5hk4phzak6gqzhpkt6akckx7xppbp53mvwt6r73h7tk4", "protocol/valory/tendermint/0.1.0": "bafybeicusvezoqlmyt6iqomcbwaz3xkhk2qf3d56q5zprmj3xdxfy64k54", - "skill/valory/abstract_abci/0.1.0": "bafybeigte2l4en4otdp2maaoc3uesqdga5z4sqozrybsmcdp26bgfbcy54", - "contract/valory/gnosis_safe/0.1.0": "bafybeie4e3ifwa3ch3rqeouzkzndyscrfidbmj2p4ykzwh4zptvsocxcya", + "skill/valory/abstract_abci/0.1.0": "bafybeiet34ju7typtkqyfn572sacef5krrsb6d4vpfnviqi6kzunje3xny", + "contract/valory/gnosis_safe/0.1.0": "bafybeic3cfap5mbdfb67iejg6zaobtpgvxoltckdgbeovwc7gpzvjz2md4", "protocol/valory/acn/1.1.0": "bafybeignmc5uh3vgpuckljcj2tgg7hdqyytkm6m5b6v6mxtazdcvubibva", "connection/valory/p2p_libp2p_client/0.1.0": "bafybeidwcobzb7ut3efegoedad7jfckvt2n6prcmd4g7xnkm6hp6aafrva", "contract/valory/multisend/0.1.0": "bafybeigjywkl7hydjsrkogob3xebj2ifhqwmfhhxoeyrndzhhxi5u6amey", diff --git a/packages/valory/agents/keep3r_bot/aea-config.yaml b/packages/valory/agents/keep3r_bot/aea-config.yaml index c56bb216..4f695f45 100644 --- a/packages/valory/agents/keep3r_bot/aea-config.yaml +++ b/packages/valory/agents/keep3r_bot/aea-config.yaml @@ -128,20 +128,20 @@ fingerprint: tests/test_contracts/test_keeper_for_testnet/test_contract.py: bafybeihpnx5554swjwo2nsixjs2l76ries442vayot4zq77z3lkyzxqhey fingerprint_ignore_patterns: [] connections: -- valory/abci:0.1.0:bafybeifpdzwpwntu2qu5qks22elglwozpwpwvihrhgw7sgyjpff7yye3za +- valory/abci:0.1.0:bafybeifzhmuvaqj5mnib65u5cqbmfpixjkow6iuh43ofricdpwdtjwawya - valory/http_client:0.23.0:bafybeidykl4elwbcjkqn32wt5h4h7tlpeqovrcq3c5bcplt6nhpznhgczi - valory/ipfs:0.1.0:bafybeigr2cipad23aebjpnqtzpgymiwrwgmnior2fk4inbscdnqyl5epla - valory/ledger:0.19.0:bafybeigvml36q4ic2tstc25xli5qw7hacykyudkuywfmc7qjb5kwfzhkka - valory/p2p_libp2p_client:0.1.0:bafybeidwcobzb7ut3efegoedad7jfckvt2n6prcmd4g7xnkm6hp6aafrva contracts: - valory/curve_pool:0.1.0:bafybeiafzmhbhx4jysseaergr2o6larftssn543fweg5a47wo6n4mrsbke -- valory/gnosis_safe:0.1.0:bafybeie4e3ifwa3ch3rqeouzkzndyscrfidbmj2p4ykzwh4zptvsocxcya -- valory/gnosis_safe_proxy_factory:0.1.0:bafybeieauenpdblyecnjorei2gbfatvgrxwoucigo6x3lksnhwknhawkqa +- valory/gnosis_safe:0.1.0:bafybeic3cfap5mbdfb67iejg6zaobtpgvxoltckdgbeovwc7gpzvjz2md4 +- valory/gnosis_safe_proxy_factory:0.1.0:bafybeif3gj5a5n6humzzsc3hacmfvfdqltzo7ibc7vvtisv3ppmbzxbkui - valory/keep3r_v1:0.1.0:bafybeie4oivgk6ip4pgkrdcw2p4puxms6g5zs3pdhn7dytizayxoeiji5m - valory/keep3r_v1_library:0.1.0:bafybeiguyavczsaebbh5docth3o6e36b24s46jynhvysewnk3hqim3a4qe - valory/keep3r_v2:0.1.0:bafybeifdya376uvb22otbkneinifqn5br3kjhmojqa42wsen2klt47477e - valory/multisend:0.1.0:bafybeigjywkl7hydjsrkogob3xebj2ifhqwmfhhxoeyrndzhhxi5u6amey -- valory/service_registry:0.1.0:bafybeiegj2cbtyqkw42q3wlqm2opl43ddnp4snavbyllsokscqrp4icwfu +- valory/service_registry:0.1.0:bafybeigxkx7pcz7blgcxtuga6c2z3fmrarcisauskusc64xulujs342rcq protocols: - open_aea/signing:1.0.0:bafybeibqlfmikg5hk4phzak6gqzhpkt6akckx7xppbp53mvwt6r73h7tk4 - valory/abci:0.1.0:bafybeig3dj5jhsowlvg3t73kgobf6xn4nka7rkttakdb2gwsg5bp7rt7q4 @@ -152,14 +152,14 @@ protocols: - valory/ledger_api:1.0.0:bafybeigpn6ysm53qkcllkzgdwc5xxpxz32xn2zoux3phdm2i3yty2i3thu - valory/tendermint:0.1.0:bafybeicusvezoqlmyt6iqomcbwaz3xkhk2qf3d56q5zprmj3xdxfy64k54 skills: -- valory/abstract_abci:0.1.0:bafybeigte2l4en4otdp2maaoc3uesqdga5z4sqozrybsmcdp26bgfbcy54 -- valory/abstract_round_abci:0.1.0:bafybeicx2f7q3wm6xllegizojx76y7jrwovttjgf7nbjs3w62x7jyffmum -- valory/keep3r_abci:0.1.0:bafybeicmh73c7ncnyr6trhrg4acbcyb6l3igqwyiwfftsv5fqahwqj474m -- valory/keep3r_job_abci:0.1.0:bafybeib7dhenfvazn3npfp6g5s4b4ug7zghwsi4d2hvu6bnb7izap7hnny -- valory/registration_abci:0.1.0:bafybeihif5gzbil5pvfcgprawhi2zt5nc2bdgcx2vp5y3kzghwzeqzyxku -- valory/reset_pause_abci:0.1.0:bafybeicjpupvkev72gtjrehnpao6dsmmgmk6izsyeyyuthmckisqdq576e -- valory/termination_abci:0.1.0:bafybeihqimzr5ojkoflvuhy35ubwjyk3t2u5xwwsufoolzqwvkukl7gnxy -- valory/transaction_settlement_abci:0.1.0:bafybeiavbytwahrflz4gqcvg7aoz7s6y3s7aytpt2cz2dm4owkxslqvnv4 +- valory/abstract_abci:0.1.0:bafybeiet34ju7typtkqyfn572sacef5krrsb6d4vpfnviqi6kzunje3xny +- valory/abstract_round_abci:0.1.0:bafybeiadrj2jzptjh6jals7rc7tp6vbv64fll5d5ich4tlr6t7eh5nqflq +- valory/keep3r_abci:0.1.0:bafybeiansgj6kn27xze3v7p7s6tklwyoshhgywi3kfudd74nxdo2lnp4su +- valory/keep3r_job_abci:0.1.0:bafybeifvmw4pjfg7fxka7drr75ylyyorpudw2aoq5ahdjzbq2colgdzsly +- valory/registration_abci:0.1.0:bafybeickxljqvum42oei3vntqbtsd77nevoxdv5ypy43hlous2bnsefpi4 +- valory/reset_pause_abci:0.1.0:bafybeifrjlalgcbb6zknkgxomfvgfqzmgi56hvcnjfplhlvrfou43epima +- valory/termination_abci:0.1.0:bafybeif2rm6wu2royxfeu4uefm6z323vrt5w5bawbqf3b3abaenpkrmyqi +- valory/transaction_settlement_abci:0.1.0:bafybeihwmzb2fsmemwxyzaou3p6j53br3jci2v66skp4nvge4mzvkx4t4u default_ledger: ethereum required_ledgers: - ethereum @@ -240,6 +240,7 @@ models: manual_gas_limit: ${int:5000000} multisend_address: ${str:0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761} raise_on_failed_simulation: ${bool:false} + slippage_tolerance: ${float:0.05} curve_pool_contract_address: ${str:0x21410232B484136404911780bC32756D5d1a9Fa9} use_flashbots: ${bool:false} termination_sleep: 900 diff --git a/packages/valory/services/keep3r_bot/service.yaml b/packages/valory/services/keep3r_bot/service.yaml index 0f345ba4..419b0d9e 100644 --- a/packages/valory/services/keep3r_bot/service.yaml +++ b/packages/valory/services/keep3r_bot/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeig26ntff2vdtmum3crflwqrybmonwdxahvlrst2brnazbo3mjvtqu fingerprint_ignore_patterns: [] -agent: valory/keep3r_bot:0.1.0:bafybeigkrckvy2m7uecswikhtli27xfvghifxirgxvkobsb2lwlsckk2ca +agent: valory/keep3r_bot:0.1.0:bafybeidhut7yja7jtebe2b3nqbl5ld7nsr64igt74f5dmhjwymuwlhy4fa number_of_agents: 1 deployment: tendermint: diff --git a/packages/valory/services/keep3r_bot_goerli/service.yaml b/packages/valory/services/keep3r_bot_goerli/service.yaml index be27a3c0..afb40763 100644 --- a/packages/valory/services/keep3r_bot_goerli/service.yaml +++ b/packages/valory/services/keep3r_bot_goerli/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeiblcg3qti2cyz4ytufdkmqzcm6svbo5cwgsu2srjovvljdi35iz6i fingerprint_ignore_patterns: [] -agent: valory/keep3r_bot:0.1.0:bafybeigkrckvy2m7uecswikhtli27xfvghifxirgxvkobsb2lwlsckk2ca +agent: valory/keep3r_bot:0.1.0:bafybeidhut7yja7jtebe2b3nqbl5ld7nsr64igt74f5dmhjwymuwlhy4fa number_of_agents: 4 deployment: tendermint: diff --git a/packages/valory/skills/keep3r_abci/skill.yaml b/packages/valory/skills/keep3r_abci/skill.yaml index cc5377f8..6cdfd521 100644 --- a/packages/valory/skills/keep3r_abci/skill.yaml +++ b/packages/valory/skills/keep3r_abci/skill.yaml @@ -20,12 +20,12 @@ connections: [] contracts: [] protocols: [] skills: -- valory/abstract_round_abci:0.1.0:bafybeicx2f7q3wm6xllegizojx76y7jrwovttjgf7nbjs3w62x7jyffmum -- valory/keep3r_job_abci:0.1.0:bafybeib7dhenfvazn3npfp6g5s4b4ug7zghwsi4d2hvu6bnb7izap7hnny -- valory/registration_abci:0.1.0:bafybeihif5gzbil5pvfcgprawhi2zt5nc2bdgcx2vp5y3kzghwzeqzyxku -- valory/reset_pause_abci:0.1.0:bafybeicjpupvkev72gtjrehnpao6dsmmgmk6izsyeyyuthmckisqdq576e -- valory/termination_abci:0.1.0:bafybeihqimzr5ojkoflvuhy35ubwjyk3t2u5xwwsufoolzqwvkukl7gnxy -- valory/transaction_settlement_abci:0.1.0:bafybeiavbytwahrflz4gqcvg7aoz7s6y3s7aytpt2cz2dm4owkxslqvnv4 +- valory/abstract_round_abci:0.1.0:bafybeiadrj2jzptjh6jals7rc7tp6vbv64fll5d5ich4tlr6t7eh5nqflq +- valory/keep3r_job_abci:0.1.0:bafybeifvmw4pjfg7fxka7drr75ylyyorpudw2aoq5ahdjzbq2colgdzsly +- valory/registration_abci:0.1.0:bafybeickxljqvum42oei3vntqbtsd77nevoxdv5ypy43hlous2bnsefpi4 +- valory/reset_pause_abci:0.1.0:bafybeifrjlalgcbb6zknkgxomfvgfqzmgi56hvcnjfplhlvrfou43epima +- valory/termination_abci:0.1.0:bafybeif2rm6wu2royxfeu4uefm6z323vrt5w5bawbqf3b3abaenpkrmyqi +- valory/transaction_settlement_abci:0.1.0:bafybeihwmzb2fsmemwxyzaou3p6j53br3jci2v66skp4nvge4mzvkx4t4u behaviours: main: args: {}