Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- thread '<unnamed>' panicked at /home/runner/work/pyperdrive/pyperdrive/hyperdrive/crates/hyperdrive-math/src/yield_space.rs:77:58:
- called `Option::unwrap()` on a `None` value
- note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
- 23-10-26 07:44:08: CRITICAL: crash_report.log_hyperdrive_crash_report:
- {
- "exception": "ContractCustomError('0x423bbb46', \"Error in preview transaction function=<Function openLong(uint256,uint256,uint256,address,bool) bound to (2622365337, 0, 0, '0xAd067079EaB67063E2c7558f425082b9B28342f6', True)>\")",
- "trade": {
- "market_type": "HYPERDRIVE",
- "action_type": "OPEN_LONG",
- "trade_amount": "0.000000002622365337",
- "slippage_tolerance": "0.0001",
- "maturity_time": 31536000
- },
- "wallet": {
- "base": "0.000000002622365337",
- "longs": [],
- "shorts": [
- {
- "maturity_time": 1730505600,
- "balance": "2085.828862990870264014"
- },
- {
- "maturity_time": 1730592000,
- "balance": "0.000427081918998121"
- }
- ],
- "lp_tokens": "0.0",
- "withdraw_shares": "0.0"
- },
- "agent_info": {
- "address": "0xAd067079EaB67063E2c7558f425082b9B28342f6",
- "policy": "SmartLong2"
- },
- "pool_config": {
- "baseToken": "0x5FbDB2315678afecb367f032d93F642f64180aa3",
- "initialSharePrice": "1.0",
- "minimumShareReserves": "0.001",
- "minimumTransactionAmount": "0.000001",
- "positionDuration": 31536000,
- "checkpointDuration": 86400,
- "timeStretch": "0.031124187940342208",
- "governance": "0x6043bF4ec8834F918242BaCA0F1F3805F2a2988D",
- "feeCollector": "0x6043bF4ec8834F918242BaCA0F1F3805F2a2988D",
- "fees": [
- "0.1",
- "0.0005",
- "0.15"
- ],
- "oracleSize": 10,
- "updateGap": 3600,
- "contractAddress": "0x3B02fF1e626Ed7a8fd6eC5299e2C54e1421B626B",
- "curveFee": "0.1",
- "flatFee": "0.0005",
- "governanceFee": "0.15",
- "invTimeStretch": "32.129352319706018283"
- },
- "pool_info": {
- "shareReserves": "56968.939905749456612283",
- "shareAdjustment": "5400.559265999360879461",
- "bondReserves": "202720.781224691983474899",
- "lpTotalSupply": "61491.968012733050609225",
- "sharePrice": "1.037267109327783772",
- "longsOutstanding": "20921.264856828268670262",
- "longAverageMaturityTime": "1747983848.173518065084400817",
- "shortsOutstanding": "27160.829290072789262135",
- "shortAverageMaturityTime": "1747997048.135221009969317001",
- "withdrawalSharesReadyToWithdraw": "0.0",
- "withdrawalSharesProceeds": "0.0",
- "lpSharePrice": "1.060131178445375225",
- "longExposure": "28389.161119541626364687",
- "timestamp": "2024-10-31 18:22:26",
- "blockNumber": 52493,
- "totalSupplyWithdrawalShares": 0
- },
- "checkpoint_info": {
- "sharePrice": "1.037244099487226857",
- "longExposure": "0.0",
- "blockNumber": 52493,
- "timestamp": "2024-11-01 03:22:26"
- },
- "additional_info": {
- "spot_price": "0.958288354223119942",
- "fixed_rate": "0.043527238532180119",
- "variable_rate": "0.03203338623046875",
- "vault_shares": "84417.960177069598440417"
- },
- "traceback": [
- " File \"/home/nate/numbergroup/elf-simulations/lib/agent0/agent0/hyperdrive/exec/execute_agent_trades.py\", line 193, in async_match_contract_call_to_trade\n trade_result = await hyperdrive.async_open_long(\n",
- " File \"/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/hyperdrive/api.py\", line 504, in async_open_long\n preview_result = smart_contract_preview_transaction(\n",
- " File \"/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/base/transactions.py\", line 156, in smart_contract_preview_transaction\n raise err\n",
- " File \"/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/base/transactions.py\", line 146, in smart_contract_preview_transaction\n return_values = retry_call(\n",
- " File \"/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/base/retry_utils.py\", line 110, in retry_call\n raise exc\n",
- " File \"/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/base/retry_utils.py\", line 104, in retry_call\n out = func(*args, **kwargs)\n",
- " File \"/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/contract/contract.py\", line 305, in call\n return call_contract_function(\n",
- " File \"/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/contract/utils.py\", line 96, in call_contract_function\n return_data = w3.eth.call(\n",
- " File \"/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/eth/eth.py\", line 256, in call\n return self._durin_call(transaction, block_identifier, state_override)\n",
- " File \"/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/eth/eth.py\", line 275, in _durin_call\n return self._call(transaction, block_identifier, state_override)\n",
- " File \"/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/module.py\", line 75, in caller\n result = w3.manager.request_blocking(\n",
- " File \"/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/manager.py\", line 325, in request_blocking\n return self.formatted_response(\n",
- " File \"/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/manager.py\", line 286, in formatted_response\n apply_error_formatters(error_formatters, response)\n",
- " File \"/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/manager.py\", line 103, in apply_error_formatters\n formatted_resp = pipe(response, error_formatters)\n",
- " File \"cytoolz/functoolz.pyx\", line 680, in cytoolz.functoolz.pipe\n",
- " File \"cytoolz/functoolz.pyx\", line 655, in cytoolz.functoolz.c_pipe\n",
- " File \"/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/_utils/contract_error_handling.py\", line 156, in raise_contract_logic_error_on_revert\n _raise_contract_error(data)\n",
- " File \"/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/_utils/contract_error_handling.py\", line 128, in _raise_contract_error\n raise ContractCustomError(response_error_data, data=response_error_data)\n"
- ],
- "commit_hash": "f498642288aaac61ac7c2721a9f920d79767ab7e"
- }
- Traceback (most recent call last):
- File "/home/nate/numbergroup/elf-simulations/lib/agent0/examples/number_group.py", line 105, in <module>
- run_agents(env_config, agent_config, account_key_config, liquidate=LIQUIDATE)
- File "/home/nate/numbergroup/elf-simulations/lib/agent0/agent0/hyperdrive/exec/run_agents.py", line 128, in run_agents
- last_executed_block = trade_if_new_block(
- File "/home/nate/numbergroup/elf-simulations/lib/agent0/agent0/hyperdrive/exec/trade_loop.py", line 113, in trade_if_new_block
- raise trade_result.exception
- File "/home/nate/numbergroup/elf-simulations/lib/agent0/agent0/hyperdrive/exec/execute_agent_trades.py", line 193, in async_match_contract_call_to_trade
- trade_result = await hyperdrive.async_open_long(
- File "/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/hyperdrive/api.py", line 504, in async_open_long
- preview_result = smart_contract_preview_transaction(
- File "/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/base/transactions.py", line 156, in smart_contract_preview_transaction
- raise err
- File "/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/base/transactions.py", line 146, in smart_contract_preview_transaction
- return_values = retry_call(
- File "/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/base/retry_utils.py", line 110, in retry_call
- raise exc
- File "/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/base/retry_utils.py", line 104, in retry_call
- out = func(*args, **kwargs)
- File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/contract/contract.py", line 305, in call
- return call_contract_function(
- File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/contract/utils.py", line 96, in call_contract_function
- return_data = w3.eth.call(
- File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/eth/eth.py", line 256, in call
- return self._durin_call(transaction, block_identifier, state_override)
- File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/eth/eth.py", line 275, in _durin_call
- return self._call(transaction, block_identifier, state_override)
- File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/module.py", line 75, in caller
- result = w3.manager.request_blocking(
- File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/manager.py", line 325, in request_blocking
- return self.formatted_response(
- File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/manager.py", line 286, in formatted_response
- apply_error_formatters(error_formatters, response)
- File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/manager.py", line 103, in apply_error_formatters
- formatted_resp = pipe(response, error_formatters)
- File "cytoolz/functoolz.pyx", line 680, in cytoolz.functoolz.pipe
- File "cytoolz/functoolz.pyx", line 655, in cytoolz.functoolz.c_pipe
- File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/_utils/contract_error_handling.py", line 156, in raise_contract_logic_error_on_revert
- _raise_contract_error(data)
- File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/_utils/contract_error_handling.py", line 128, in _raise_contract_error
- raise ContractCustomError(response_error_data, data=response_error_data)
- web3.exceptions.ContractCustomError: ('0x423bbb46', "Error in preview transaction function=<Function openLong(uint256,uint256,uint256,address,bool) bound to (2622365337, 0, 0, '0xAd067079EaB67063E2c7558f425082b9B28342f6', True)>")
Advertisement
Add Comment
Please, Sign In to add comment