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

increase depth of our curve v2 factory pool #34

Closed
gosuto-inzasheru opened this issue Jan 25, 2022 · 6 comments
Closed

increase depth of our curve v2 factory pool #34

gosuto-inzasheru opened this issue Jan 25, 2022 · 6 comments
Assignees
Labels

Comments

@gosuto-inzasheru
Copy link
Collaborator

gosuto-inzasheru commented Jan 25, 2022

steps:

  • get 3.5 wbtc + ~15k badger to techops. withdrawing from bibbtc position on the vault might already be done by deploy next lower range for univ3 tcl #32 . can use MintableForkToken for testing first
  • deposit fraction of this, ie 1 wbtc + equal parts badger
  • monitor diff between price oracle and price scale
  • swap or withdraw at unequal parts?
  • repeat until calibrated

dev: not sure on func sigs for the v2 pool compared to the old style. prob best to get interfaces for the new pool/token and maybe add curve_v2 class to great ape if needed.

deadline: the pool should consistently trade within a few percent of the market price by the next gauge vote that starts on February 2nd.

ref: https://curve.fi/factory-crypto/4

@gosuto-inzasheru
Copy link
Collaborator Author

https://gnosis-safe.io/app/eth:0x042B32Ac6b453485e357938bdC38e0340d4b9276/transactions/0x5108a3b55f7814b3c4bcf6322bff960c8ac571d82531a3567b3a6b0a6e1aaea0

Events In This Transaction
--------------------------
├── Curve.fi Factory BTC Metapool: ibBTC (0xFbdCA68601f835b27790D98bbb8eC7f05FDEaA9B)
│   └── (unknown)
│       ├── topic1: 0x5ad056f2e28a8cec232015406b843668c1e36cda598127ec3b8c59b8c72773a0
│       ├── topic2: 0x0000000000000000000000007abdbaf29929e7f8621b757d2a7c04d78d633834
│       └── data: 0x0000000000000000000000000000000000000000000000001b0b9895519b8d1a0000000000000000000000000000000000000000000000001acada6862d3015f000000000000000000000000000000000000000000000228c177e37e86122bfa
│   
├── IStableSwap (0x7fC77b5c7614E1533320Ea6DDc2Eb61fa00A9714)
│   └── (unknown)
│       ├── topic1: 0x9e96dd3b997a2a257eec4df9bb6eaf626e206df5f543bd963682d143300be310
│       ├── topic2: 0x0000000000000000000000007abdbaf29929e7f8621b757d2a7c04d78d633834
│       └── data: 0x0000000000000000000000000000000000000000000000001acada6862d3015f000000000000000000000000000000000000000000000000000000000ba10584
│   
├── ICurvePoolV2 (0x50f3752289e1456BfA505afd37B241bca23e685d)
│   └── (unknown)
│       ├── topic1: 0x540ab385f9b5d450a27404172caade516b3ba3f4be88239ac56a2ad1de2a1f5a
│       ├── topic2: 0x000000000000000000000000042b32ac6b453485e357938bdc38e0340d4b9276
│       └── data: 0x00000000000000000000000000000000000000000000010f0cf064dd59200000000000000000000000000000000000000000000000000000000000000854b98d000000000000000000000000000000000000000000000000001cf1cc62e1a1680000000000000000000000000000000000000000000000058a2841ab464aaf7e
│   
└── Gnosis Safe (0x042B32Ac6b453485e357938bdC38e0340d4b9276)
    └── ExecutionSuccess
        ├── txHash: 0x49af2ae15e26a70fea36aa5fd087a9935b09fe46338fd0cb32ab1579e2963aec
        └── payment: 0

{
│   'ethereum_client': <gnosis.eth.ethereum_client.EthereumClient object at 0x1203530d0>,
│   'safe_address': '0x042B32Ac6b453485e357938bdC38e0340d4b9276',
│   'to': '0x40A2aCCbd92BCA938b02010E17A5b8929b49130D',
│   'value': 0,
│   'data': HexBytes('0x8d80ff0a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000003d600ae96ff08771a109dc6650a1bdca62f2d558e40af000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000242e1a7d4d0000000000000000000000000000000000000000000000001365a30c66953d0800fbdca68601f835b27790d98bbb8ec7f05fdeaa9b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000007abdbaf29929e7f8621b757d2a7c04d78d6338340000000000000000000000000000000000000000000000001b0b9895519b8d1a007abdbaf29929e7f8621b757d2a7c04d78d6338340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008429ed2862000000000000000000000000fbdca68601f835b27790d98bbb8ec7f05fdeaa9b0000000000000000000000000000000000000000000000001b0b9895519b8d1a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000b657b2a003472a5a71965499acd81997a54bba8d852c6e53d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b300000000000000000000000050f3752289e1456bfa505afd37b241bca23e685d00000000000000000000000000000000000000000000010f0cf064dd59200000002260fac5e5542a773aa44fbcfedf7c193bc2c59900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b300000000000000000000000050f3752289e1456bfa505afd37b241bca23e685d000000000000000000000000000000000000000000000000000000000854b98d0050f3752289e1456bfa505afd37b241bca23e685d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000640b4c7e4d00000000000000000000000000000000000000000000010f0cf064dd59200000000000000000000000000000000000000000000000000000000000000854b98d000000000000000000000000000000000000000000000004706be5cfbec8ff1000000000000000000000'),
│   'operation': 1,
│   'safe_tx_gas': 0,
│   'base_gas': 0,
│   'gas_price': 0,
│   'gas_token': '0x0000000000000000000000000000000000000000',
│   'refund_receiver': '0x0000000000000000000000000000000000000000',
│   'signatures': b'',
│   '_safe_nonce': 36,
│   '_safe_version': '1.3.0',
│   '_chain_id': None
}
snapshot result for 0x042B32Ac6b453485e357938bdC38e0340d4b9276:
                             balance_before              balance_after              balance_delta
symbol                                                                                           
BADGER            15,000.000000000000000000  10,000.000000000000000000  -5,000.000000000000000000
WBTC                   0.046680780000000000       0.599999090000000000       0.553318310000000000
BADGERWBTC-f           0.000000000000000000      83.558976867363267849      83.558976867363267849
bibbtc/sbtcCRV-f      25.000000000000000000      23.602297466975601400      -1.397702533024398600
ibbtc/sbtcCRV-f        0.551116497830170642       0.000000000000000000      -0.551116497830170642 

@gosuto-inzasheru
Copy link
Collaborator Author

@gosuto-inzasheru
Copy link
Collaborator Author

https://gnosis-safe.io/app/eth:0x042B32Ac6b453485e357938bdC38e0340d4b9276/transactions/0x389e99d8ef34c3693cf39e10a61f63810a90a1905d57300528202c493c8f3a89

{
│   'ethereum_client': <gnosis.eth.ethereum_client.EthereumClient object at 0x110753c10>,
│   'safe_address': '0x042B32Ac6b453485e357938bdC38e0340d4b9276',
│   'to': '0x40A2aCCbd92BCA938b02010E17A5b8929b49130D',
│   'value': 0,
│   'data': HexBytes('0x8d80ff0a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000003d600ae96ff08771a109dc6650a1bdca62f2d558e40af000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000242e1a7d4d00000000000000000000000000000000000000000000000012d7e4a06d87265c00fbdca68601f835b27790d98bbb8ec7f05fdeaa9b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000007abdbaf29929e7f8621b757d2a7c04d78d63383400000000000000000000000000000000000000000000000012d7e4a06d87265c007abdbaf29929e7f8621b757d2a7c04d78d6338340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008429ed2862000000000000000000000000fbdca68601f835b27790d98bbb8ec7f05fdeaa9b00000000000000000000000000000000000000000000000012d7e4a06d87265c00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000007f0b178003472a5a71965499acd81997a54bba8d852c6e53d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b300000000000000000000000050f3752289e1456bfa505afd37b241bca23e685d00000000000000000000000000000000000000000000010f0cf064dd59200000002260fac5e5542a773aa44fbcfedf7c193bc2c59900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b300000000000000000000000050f3752289e1456bfa505afd37b241bca23e685d000000000000000000000000000000000000000000000000000000000817d8a70050f3752289e1456bfa505afd37b241bca23e685d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000640b4c7e4d00000000000000000000000000000000000000000000010f0cf064dd59200000000000000000000000000000000000000000000000000000000000000817d8a70000000000000000000000000000000000000000000000045fdd085ed011c97000000000000000000000'),
│   'operation': 1,
│   'safe_tx_gas': 0,
│   'base_gas': 0,
│   'gas_price': 0,
│   'gas_token': '0x0000000000000000000000000000000000000000',
│   'refund_receiver': '0x0000000000000000000000000000000000000000',
│   'signatures': b'',
│   '_safe_nonce': 37,
│   '_safe_version': '1.3.0',
│   '_chain_id': None
}
snapshot result for 0x042B32Ac6b453485e357938bdC38e0340d4b9276:
                             balance_before             balance_after              balance_delta
symbol                                                                                          
BADGER            10,000.000000000000000000  5,000.000000000000000000  -5,000.000000000000000000
WBTC                   0.599999090000000000      0.601526390000000000       0.001527300000000000
BADGERWBTC-f          83.558976867363267849    165.900469624103242428      82.341492756739974579
bibbtc/sbtcCRV-f      23.602297466975601400     22.244492276616633500      -1.357805190358967900

@gosuto-inzasheru
Copy link
Collaborator Author

@gosuto-inzasheru
Copy link
Collaborator Author

nonce 38: https://gnosis-safe.io/app/eth:0x042B32Ac6b453485e357938bdC38e0340d4b9276/transactions/0x476dfa4f2b42c276e601cecc135e4936db66e77b2fad3b95bf03ed8b44937115

snapshot result for 0x042B32Ac6b453485e357938bdC38e0340d4b9276:
                            balance_before           balance_after              balance_delta
symbol                                                                                       
BADGER            5,000.000000000000000000    0.000000000000000000  -5,000.000000000000000000
WBTC                  0.601531700000000000    0.671051100000000000       0.069519400000000000
BADGERWBTC-f        165.900469624103242428  243.447151239322582783      77.546681615219340355
bibbtc/sbtcCRV-f     22.244492276616633500   21.040302707297603800      -1.204189569319029700
ibbtc/sbtcCRV-f       0.069919854364661691    0.000000000000000000      -0.069919854364661691 

{
│   'ethereum_client': <gnosis.eth.ethereum_client.EthereumClient object at 0x11610e1c0>,
│   'safe_address': '0x042B32Ac6b453485e357938bdC38e0340d4b9276',
│   'to': '0x40A2aCCbd92BCA938b02010E17A5b8929b49130D',
│   'value': 0,
│   'data': HexBytes('0x8d80ff0a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000003d600ae96ff08771a109dc6650a1bdca62f2d558e40af000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000242e1a7d4d00000000000000000000000000000000000000000000000010b62408817dcbc400fbdca68601f835b27790d98bbb8ec7f05fdeaa9b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000007abdbaf29929e7f8621b757d2a7c04d78d63383400000000000000000000000000000000000000000000000011ae8bc533a4e37f007abdbaf29929e7f8621b757d2a7c04d78d6338340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008429ed2862000000000000000000000000fbdca68601f835b27790d98bbb8ec7f05fdeaa9b00000000000000000000000000000000000000000000000011ae8bc533a4e37f0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000770a7b6003472a5a71965499acd81997a54bba8d852c6e53d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b300000000000000000000000050f3752289e1456bfa505afd37b241bca23e685d00000000000000000000000000000000000000000000010f0cf064dd59200000002260fac5e5542a773aa44fbcfedf7c193bc2c59900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b300000000000000000000000050f3752289e1456bfa505afd37b241bca23e685d00000000000000000000000000000000000000000000000000000000072d728c0050f3752289e1456bfa505afd37b241bca23e685d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000640b4c7e4d00000000000000000000000000000000000000000000010f0cf064dd5920000000000000000000000000000000000000000000000000000000000000072d728c0000000000000000000000000000000000000000000000041ea72225d1c13a8000000000000000000000'),
│   'operation': 1,
│   'safe_tx_gas': 0,
│   'base_gas': 0,
│   'gas_price': 0,
│   'gas_token': '0x0000000000000000000000000000000000000000',
│   'refund_receiver': '0x0000000000000000000000000000000000000000',
│   'signatures': b'',
│   '_safe_nonce': 38,
│   '_safe_version': '1.3.0',
│   '_chain_id': None
}

@gosuto-inzasheru
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Executed
Development

No branches or pull requests

2 participants