-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: trader app template for olas operate app
- Loading branch information
1 parent
2bf26b2
commit fc7d069
Showing
4 changed files
with
386 additions
and
222 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## Trader | ||
|
||
A trading service which: | ||
|
||
1. Searches for new questions on the supported prediction markets | ||
2. Selects a question to investigate its answer | ||
3. Predicts the answer for the selected question | ||
4. Decides whether answering this question is profitable | ||
5. Submits the answer if it is profitable, otherwise temporarily blacklists the question | ||
|
||
This trader is configured to run on the Gnosis chain against the Omen Prediction Markets |
131 changes: 131 additions & 0 deletions
131
packages/valory/services/trader_omen_gnosis/service.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
name: trader_omen_gnosis | ||
author: valory | ||
version: 0.1.0 | ||
description: A set of agents placing bets on omen | ||
aea_version: '>=1.0.0, <2.0.0' | ||
license: Apache-2.0 | ||
fingerprint: | ||
README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e | ||
fingerprint_ignore_patterns: [] | ||
agent: valory/trader:0.1.0:bafybeiexmyrslgxqnygcbir5ws26ltcjv5qo7e7plqapoo3j22xuqpfy64 | ||
number_of_agents: 1 | ||
deployment: | ||
chain: | ||
nft: bafybeig64atqaladigoc3ds4arltdu63wkdrk3gesjfvnfdmz35amv7faq | ||
agent_id: 14 | ||
threshold: 1 | ||
cost_of_bond: 10000000000000000 | ||
funds: | ||
agent: 0.1 | ||
safe: 0.5 | ||
local: | ||
volumes: | ||
data: /data | ||
--- | ||
public_id: valory/trader_abci:0.1.0 | ||
type: skill | ||
models: | ||
params: | ||
args: | ||
setup: | ||
all_participants: [] | ||
safe_contract_address: '0x0000000000000000000000000000000000000000' | ||
consensus_threshold: null | ||
drand_public_key: 868f005eb8e6e4ca0a47c8a77ceaa5309a47978a7c71bc5cce96366b5d7a569937c529eeda66c7293784a9402801af31 | ||
multisend_address: '0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761' | ||
on_chain_service_id: null | ||
service_id: trader | ||
service_registry_address: '0x9338b5153AE39BB89f50468E608eD9d764B755fD' | ||
agent_registry_address: '0xE49CB081e8d96920C38aA7AB90cb0294ab4Bc8EA' | ||
sleep_time: 1 | ||
tendermint_com_url: http://localhost:8080 | ||
tendermint_url: http://localhost:26657 | ||
tendermint_p2p_url: node0:26656 | ||
creator_per_subgraph: | ||
omen_subgraph: | ||
- '0x89c5cc945dd550BcFfb72Fe42BfF002429F46Fec' | ||
slot_count: 2 | ||
opening_margin: 300 | ||
languages: | ||
- en_US | ||
average_block_time: 5 | ||
abt_error_mult: 5 | ||
mech_agent_address: '0x77af31De935740567Cf4fF1986D04B2c964A786a' | ||
sample_bets_closing_days: 10 | ||
trading_strategy: kelly_criterion | ||
use_fallback_strategy: true | ||
bet_threshold: 5000000000000000 | ||
blacklisting_duration: 3600 | ||
ipfs_address: https://gateway.autonolas.tech/ipfs/ | ||
prompt_template: With the given question "@{question}" and the `yes` option | ||
represented by `@{yes}` and the `no` option represented by `@{no}`, what are | ||
the respective probabilities of `p_yes` and `p_no` occurring? | ||
dust_threshold: 10000000000000 | ||
conditional_tokens_address: '0xCeAfDD6bc0bEF976fdCd1112955828E00543c0Ce' | ||
realitio_proxy_address: '0xAB16D643bA051C11962DA645f74632d3130c81E2' | ||
realitio_address: '0x79e32aE03fb27B07C89c0c568F80287C01ca2E57' | ||
event_filtering_batch_size: 5000 | ||
reduce_factor: 0.25 | ||
max_filtering_retries: 6 | ||
minimum_batch_size: 500 | ||
redeeming_batch_size: 1 | ||
slippage: 0.01 | ||
policy_epsilon: 0.1 | ||
policy_store_path: /data/ | ||
irrelevant_tools: | ||
- openai-text-davinci-002 | ||
- openai-text-davinci-003 | ||
- openai-gpt-3.5-turbo | ||
- openai-gpt-4 | ||
- stabilityai-stable-diffusion-v1-5 | ||
- stabilityai-stable-diffusion-xl-beta-v2-2-2 | ||
- stabilityai-stable-diffusion-512-v2-1 | ||
- stabilityai-stable-diffusion-768-v2-1 | ||
staking_contract_address: '0x2Ef503950Be67a98746F484DA0bBAdA339DF3326' | ||
agent_balance_threshold: 10000000000000000 | ||
refill_check_interval: 10 | ||
tool_punishment_multiplier: 1 | ||
redeem_round_timeout: 3600.0 | ||
contract_timeout: 300.0 | ||
file_hash_to_strategies_json: ${FILE_HASH_TO_STRATEGIES_JSON:list:[["bafybeia4m2mzhedzjbm3enmhgd6csd6hredgwsgpgs2wm2j43vodeqxjfy",["bet_amount_per_threshold"]],["bafybeibtbw44oslyxqrgpnu644zcyc763phtr4rsglxb4b4ma4ha3k5kyq",["kelly_criterion"]]]} | ||
strategies_kwargs: ${STRATEGIES_KWARGS:list:[["bet_kelly_fraction",0.5],["floor_balance",500000000000000000],["bet_amount_per_threshold",{"0.0":0,"0.1":0,"0.2":0,"0.3":0,"0.4":0,"0.5":0,"0.6":60000000000000000,"0.7":90000000000000000,"0.8":100000000000000000,"0.9":1000000000000000000,"1.0":10000000000000000000}]]} | ||
mech_to_subscription_params: ${SUBSCRIPTION_PARAMS:list:[["base_url", "https://marketplace-api.gnosis.nevermined.app/api/v1/metadata/assets/ddo"], | ||
["did", "did:nv:0ea01d5de3b34e3792db825f2a5f5595c393c68b19fd5efdacd00fcc63a53483"], | ||
["escrow_payment_condition_address", "0x9dDC4F1Ea5b94C138A23b60EC48c0d01d172629a"], | ||
["lock_payment_condition_address", "0xDE85A368Ee6f374d236500d176814365370778dA"], | ||
["transfer_nft_condition_address", "0xbBa4A25262745a55f020D0a3E9a82c25bb6F4979"], | ||
["token_address", "0x80A9b55F8604acC26dF2Ac6e07F9dC5B0eAa05Ce"], ["order_address", | ||
"0xc7751eff5396a846e7bc83ac31d3cb7d37cb49e4"], ["nft_amount", "100"], ["payment_token", | ||
"0x0000000000000000000000000000000000000000"], ["order_address", "0xc7751eff5396a846e7bc83ac31d3cb7d37cb49e4"], | ||
["price", "1000000000000000000"]]} | ||
use_subgraph_for_redeeming: true | ||
use_nevermined: false | ||
benchmark_tool: | ||
args: | ||
log_dir: /benchmarks | ||
--- | ||
public_id: valory/ledger:0.19.0 | ||
type: connection | ||
config: | ||
ledger_apis: | ||
ethereum: | ||
address: http://host.docker.internal:8545 | ||
chain_id: 100 | ||
default_gas_price_strategy: eip1559 | ||
poa_chain: false | ||
--- | ||
public_id: valory/p2p_libp2p_client:0.1.0 | ||
type: connection | ||
config: | ||
nodes: | ||
- uri: acn.staging.autonolas.tech:9005 | ||
public_key: 02d3a830c9d6ea1ae91936951430dee11f4662f33118b02190693be835359a9d77 | ||
cert_requests: | ||
- identifier: acn | ||
ledger_id: ethereum | ||
message_format: '{public_key}' | ||
not_after: '2023-01-01' | ||
not_before: '2022-01-01' | ||
public_key: 02d3a830c9d6ea1ae91936951430dee11f4662f33118b02190693be835359a9d77 | ||
save_path: .certs/acn_cosmos_11000.txt | ||
is_abstract: false |
Oops, something went wrong.