Guest User

Untitled

a guest
Oct 25th, 2023
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.35 KB | None | 0 0
  1. thread '<unnamed>' panicked at /home/runner/work/pyperdrive/pyperdrive/hyperdrive/crates/hyperdrive-math/src/yield_space.rs:77:58:
  2. called `Option::unwrap()` on a `None` value
  3. note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  4.  
  5. 23-10-26 07:44:08: CRITICAL: crash_report.log_hyperdrive_crash_report:
  6. {
  7. "exception": "ContractCustomError('0x423bbb46', \"Error in preview transaction function=<Function openLong(uint256,uint256,uint256,address,bool) bound to (2622365337, 0, 0, '0xAd067079EaB67063E2c7558f425082b9B28342f6', True)>\")",
  8. "trade": {
  9. "market_type": "HYPERDRIVE",
  10. "action_type": "OPEN_LONG",
  11. "trade_amount": "0.000000002622365337",
  12. "slippage_tolerance": "0.0001",
  13. "maturity_time": 31536000
  14. },
  15. "wallet": {
  16. "base": "0.000000002622365337",
  17. "longs": [],
  18. "shorts": [
  19. {
  20. "maturity_time": 1730505600,
  21. "balance": "2085.828862990870264014"
  22. },
  23. {
  24. "maturity_time": 1730592000,
  25. "balance": "0.000427081918998121"
  26. }
  27. ],
  28. "lp_tokens": "0.0",
  29. "withdraw_shares": "0.0"
  30. },
  31. "agent_info": {
  32. "address": "0xAd067079EaB67063E2c7558f425082b9B28342f6",
  33. "policy": "SmartLong2"
  34. },
  35. "pool_config": {
  36. "baseToken": "0x5FbDB2315678afecb367f032d93F642f64180aa3",
  37. "initialSharePrice": "1.0",
  38. "minimumShareReserves": "0.001",
  39. "minimumTransactionAmount": "0.000001",
  40. "positionDuration": 31536000,
  41. "checkpointDuration": 86400,
  42. "timeStretch": "0.031124187940342208",
  43. "governance": "0x6043bF4ec8834F918242BaCA0F1F3805F2a2988D",
  44. "feeCollector": "0x6043bF4ec8834F918242BaCA0F1F3805F2a2988D",
  45. "fees": [
  46. "0.1",
  47. "0.0005",
  48. "0.15"
  49. ],
  50. "oracleSize": 10,
  51. "updateGap": 3600,
  52. "contractAddress": "0x3B02fF1e626Ed7a8fd6eC5299e2C54e1421B626B",
  53. "curveFee": "0.1",
  54. "flatFee": "0.0005",
  55. "governanceFee": "0.15",
  56. "invTimeStretch": "32.129352319706018283"
  57. },
  58. "pool_info": {
  59. "shareReserves": "56968.939905749456612283",
  60. "shareAdjustment": "5400.559265999360879461",
  61. "bondReserves": "202720.781224691983474899",
  62. "lpTotalSupply": "61491.968012733050609225",
  63. "sharePrice": "1.037267109327783772",
  64. "longsOutstanding": "20921.264856828268670262",
  65. "longAverageMaturityTime": "1747983848.173518065084400817",
  66. "shortsOutstanding": "27160.829290072789262135",
  67. "shortAverageMaturityTime": "1747997048.135221009969317001",
  68. "withdrawalSharesReadyToWithdraw": "0.0",
  69. "withdrawalSharesProceeds": "0.0",
  70. "lpSharePrice": "1.060131178445375225",
  71. "longExposure": "28389.161119541626364687",
  72. "timestamp": "2024-10-31 18:22:26",
  73. "blockNumber": 52493,
  74. "totalSupplyWithdrawalShares": 0
  75. },
  76. "checkpoint_info": {
  77. "sharePrice": "1.037244099487226857",
  78. "longExposure": "0.0",
  79. "blockNumber": 52493,
  80. "timestamp": "2024-11-01 03:22:26"
  81. },
  82. "additional_info": {
  83. "spot_price": "0.958288354223119942",
  84. "fixed_rate": "0.043527238532180119",
  85. "variable_rate": "0.03203338623046875",
  86. "vault_shares": "84417.960177069598440417"
  87. },
  88. "traceback": [
  89. " 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",
  90. " 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",
  91. " File \"/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/base/transactions.py\", line 156, in smart_contract_preview_transaction\n raise err\n",
  92. " 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",
  93. " File \"/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/base/retry_utils.py\", line 110, in retry_call\n raise exc\n",
  94. " File \"/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/base/retry_utils.py\", line 104, in retry_call\n out = func(*args, **kwargs)\n",
  95. " 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",
  96. " 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",
  97. " 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",
  98. " 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",
  99. " 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",
  100. " 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",
  101. " 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",
  102. " 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",
  103. " File \"cytoolz/functoolz.pyx\", line 680, in cytoolz.functoolz.pipe\n",
  104. " File \"cytoolz/functoolz.pyx\", line 655, in cytoolz.functoolz.c_pipe\n",
  105. " 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",
  106. " 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"
  107. ],
  108. "commit_hash": "f498642288aaac61ac7c2721a9f920d79767ab7e"
  109. }
  110. Traceback (most recent call last):
  111. File "/home/nate/numbergroup/elf-simulations/lib/agent0/examples/number_group.py", line 105, in <module>
  112. run_agents(env_config, agent_config, account_key_config, liquidate=LIQUIDATE)
  113. File "/home/nate/numbergroup/elf-simulations/lib/agent0/agent0/hyperdrive/exec/run_agents.py", line 128, in run_agents
  114. last_executed_block = trade_if_new_block(
  115. File "/home/nate/numbergroup/elf-simulations/lib/agent0/agent0/hyperdrive/exec/trade_loop.py", line 113, in trade_if_new_block
  116. raise trade_result.exception
  117. File "/home/nate/numbergroup/elf-simulations/lib/agent0/agent0/hyperdrive/exec/execute_agent_trades.py", line 193, in async_match_contract_call_to_trade
  118. trade_result = await hyperdrive.async_open_long(
  119. File "/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/hyperdrive/api.py", line 504, in async_open_long
  120. preview_result = smart_contract_preview_transaction(
  121. File "/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/base/transactions.py", line 156, in smart_contract_preview_transaction
  122. raise err
  123. File "/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/base/transactions.py", line 146, in smart_contract_preview_transaction
  124. return_values = retry_call(
  125. File "/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/base/retry_utils.py", line 110, in retry_call
  126. raise exc
  127. File "/home/nate/numbergroup/elf-simulations/lib/ethpy/ethpy/base/retry_utils.py", line 104, in retry_call
  128. out = func(*args, **kwargs)
  129. File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/contract/contract.py", line 305, in call
  130. return call_contract_function(
  131. File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/contract/utils.py", line 96, in call_contract_function
  132. return_data = w3.eth.call(
  133. File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/eth/eth.py", line 256, in call
  134. return self._durin_call(transaction, block_identifier, state_override)
  135. File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/eth/eth.py", line 275, in _durin_call
  136. return self._call(transaction, block_identifier, state_override)
  137. File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/module.py", line 75, in caller
  138. result = w3.manager.request_blocking(
  139. File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/manager.py", line 325, in request_blocking
  140. return self.formatted_response(
  141. File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/manager.py", line 286, in formatted_response
  142. apply_error_formatters(error_formatters, response)
  143. File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/manager.py", line 103, in apply_error_formatters
  144. formatted_resp = pipe(response, error_formatters)
  145. File "cytoolz/functoolz.pyx", line 680, in cytoolz.functoolz.pipe
  146. File "cytoolz/functoolz.pyx", line 655, in cytoolz.functoolz.c_pipe
  147. 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
  148. _raise_contract_error(data)
  149. File "/home/nate/numbergroup/elf-simulations/env/lib/python3.10/site-packages/web3/_utils/contract_error_handling.py", line 128, in _raise_contract_error
  150. raise ContractCustomError(response_error_data, data=response_error_data)
  151. web3.exceptions.ContractCustomError: ('0x423bbb46', "Error in preview transaction function=<Function openLong(uint256,uint256,uint256,address,bool) bound to (2622365337, 0, 0, '0xAd067079EaB67063E2c7558f425082b9B28342f6', True)>")
  152.  
Advertisement
Add Comment
Please, Sign In to add comment