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

BIP-592: Exit and Withdraw from BAL AURA ARB Pool Arbitrum #914

Merged

Conversation

Zen-Maxi
Copy link
Collaborator

Instructions: https://docs.google.com/document/d/14Yaey2GbFvxN0ajrW9Tao7RlNXm6UZrN99ON7ejf4IA/edit

Sim: https://dashboard.tenderly.co/public/safe/safe-apps/simulator/dc2a26ad-f60f-42f6-aa6a-8b2561eb68c7

Specification:

The DAO Multisig on Arbitrum 0xaF23DC5983230E9eEAf93280e312e57539D098D0 will interact with the AuraArbBalGrant contract at 0x8D803f7f7e26E586ee90E5A872cf7830e21f7727 and write the exit function and for _minOuts will pass the return amounts in uint256 format from the queryExit of the poolId 0xbcaa6c053cab3dd73a2e898d89a4f84a180ae1ca000100000000000000000458 for a proportional exit for BAL, AURA, and ARB respectively.

Following the exit, in the same transaction,, the DAO multisig 0xaF23DC5983230E9eEAf93280e312e57539D098D0 will also write the same contract, 0x8D803f7f7e26E586ee90E5A872cf7830e21f7727 function withdrawBalances to receive the tokens to the multisig.

For Reference:

AuraArbBalGrant Contract https://arbiscan.io/address/0x8d803f7f7e26e586ee90e5a872cf7830e21f7727#readContract

BPT Held: https://arbiscan.io/token/0xbcaa6c053cab3dd73a2e898d89a4f84a180ae1ca?a=0x8d803f7f7e26e586ee90e5a872cf7830e21f7727

balanceOf returns 3242539693298704732855523, 3,242,539.693 Pool tokens.

At the time of writing minOuts would be:

[407389945800000000000000, 2376519156700000000000000, 1361586315300000000000000]

https://dashboard.tenderly.co/public/safe/safe-apps/simulator/dc2a26ad-f60f-42f6-aa6a-8b2561eb68c7

This is subject to change at the time of payload execution.

Zen-Maxi and others added 4 commits April 23, 2024 15:04
Instructions: https://docs.google.com/document/d/14Yaey2GbFvxN0ajrW9Tao7RlNXm6UZrN99ON7ejf4IA/edit

Sim: https://dashboard.tenderly.co/public/safe/safe-apps/simulator/dc2a26ad-f60f-42f6-aa6a-8b2561eb68c7

#### Specification:

The DAO Multisig on Arbitrum `0xaF23DC5983230E9eEAf93280e312e57539D098D0` will interact with the AuraArbBalGrant contract at `0x8D803f7f7e26E586ee90E5A872cf7830e21f7727` and write the `exit` function and for `_minOuts` will pass the return amounts in uint256 format from the queryExit of the poolId `0xbcaa6c053cab3dd73a2e898d89a4f84a180ae1ca000100000000000000000458` for a proportional exit for BAL, AURA, and ARB respectively.

Following the exit, in the same transaction,, the DAO multisig `0xaF23DC5983230E9eEAf93280e312e57539D098D0` will also write the same contract, `0x8D803f7f7e26E586ee90E5A872cf7830e21f7727` function `withdrawBalances` to receive the tokens to the multisig.

For Reference:

AuraArbBalGrant Contract https://arbiscan.io/address/0x8d803f7f7e26e586ee90e5a872cf7830e21f7727#readContract

BPT Held: https://arbiscan.io/token/0xbcaa6c053cab3dd73a2e898d89a4f84a180ae1ca?a=0x8d803f7f7e26e586ee90e5a872cf7830e21f7727

`balanceOf` returns `3242539693298704732855523`, 3,242,539.693 Pool tokens.

At the time of writing `minOuts` would be:

[`407389945800000000000000`, `2376519156700000000000000`, `1361586315300000000000000`]

https://dashboard.tenderly.co/public/safe/safe-apps/simulator/dc2a26ad-f60f-42f6-aa6a-8b2561eb68c7

This is subject to change at the time of payload execution.
- assign BIP number to json and folder
- Add name and description to payload
@Xeonus Xeonus changed the title BIP-XXX-Exit-and-Withdraw-from-BAL-AURA-ARB-Pool-Arbitrum BIP-592: Exit and Withdraw from BAL AURA ARB Pool Arbitrum Apr 24, 2024
@BalancerMaxis BalancerMaxis deleted a comment from github-actions bot Apr 25, 2024
@BalancerMaxis BalancerMaxis deleted a comment from github-actions bot Apr 25, 2024
@@ -29,6 +29,17 @@
"contractInputsValues": {
"_minOuts": "[396663000000000000000000, 2299087000000000000000000, 1360655000000000000000000]"
}
},
{
"to": "0x8D803f7f7e26E586ee90E5A872cf7830e21f7727",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xeonus
Xeonus previously approved these changes Apr 25, 2024
Copy link
Collaborator

@Xeonus Xeonus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call method looks good, verified on contract

Tritium-VLK
Tritium-VLK previously approved these changes Apr 25, 2024
Copy link
Member

@Tritium-VLK Tritium-VLK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be executed with private RPC>

@Tritium-VLK
Copy link
Member

Concerned that 2% is not enough room, prices could move, and this tx could start to revert. This would cuase the whole batch to have to be replaced.

1: Consider wider ranges
2: if theya re not really wide run it's own tx/do not batch.

@gosuto-inzasheru
Copy link
Member

this was discussed already right? numbers need to be adjusted as close to the actual posting of the tx as possible. and yea that could be done with 5% slippage or whatever as well

@Tritium-VLK
Copy link
Member

Would be nice if this were in the BIP, specific details. I don't like making unilateral with the DAOs resources. My job here is only to execute what is instructed by governance, not to "think or interpret it".

In this case I'll get a few approvals by Maxis on the final TX as I am not comfortable taking this decision without boundaries set/approved by governance.

@Tritium-VLK
Copy link
Member

Tritium-VLK commented Apr 29, 2024

I suggest 10% below market price and we exec with private RPC. There's some risk someone could exec before us after the last siggy, but it seems very low risk.

Current tenderly
90% would be:
[36283773870000002039808, 2058925925750633987571712, 128719428660000012107776]

"payable": false
},
"contractInputsValues": {
"_minOuts": "[396663000000000000000000, 2299087000000000000000000, 1360655000000000000000000]"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"_minOuts": "[396663000000000000000000, 2299087000000000000000000, 1360655000000000000000000]"
"_minOuts": "[36283773870000002039808, 2058925925750633987571712, 128719428660000012107776]"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing as per comment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commited into branch/new report should have final minouts.

@Tritium-VLK Tritium-VLK dismissed stale reviews from Xeonus and themself via ef1cac3 April 29, 2024 16:32
@BalancerMaxis BalancerMaxis deleted a comment from github-actions bot Apr 29, 2024
@BalancerMaxis BalancerMaxis deleted a comment from github-actions bot Apr 29, 2024
@BalancerMaxis BalancerMaxis deleted a comment from github-actions bot Apr 29, 2024
@BalancerMaxis BalancerMaxis deleted a comment from github-actions bot Apr 29, 2024
Copy link
Contributor

BIP validation results for file BIPs/2024-W18/BIP-592 Exit and Withdraw from BAL/AURA/BIP-592.json:
Commit: ef1cac38cf855027251216279231e9f08837b743

+-------------------------------+--------+
|           Validator           | Result |
+-------------------------------+--------+
|     validate_contains_msig    |   OK   |
| validate_msig_in_address_book |   OK   |
|    validate_chain_specified   |   OK   |
|     validate_file_has_bip     |   OK   |
|  validate_path_has_weekly_dir |   OK   |
+-------------------------------+--------+

Copy link
Contributor

FILENAME: BIPs/2024-W18/BIP-592 Exit and Withdraw from BAL/AURA/BIP-592.json
MULTISIG: multisigs/dao (arbitrum:0xaF23DC5983230E9eEAf93280e312e57539D098D0)
COMMIT: ef1cac38cf855027251216279231e9f08837b743
CHAIN(S): arbitrum
TENDERLY: SUCCESS

+------------------+-----------------------------------------------------------------------------------------+---------+-----------------------------------+--------------+------------+
| fx_name          | to                                                                                      |   value | inputs                            | bip_number   | tx_index   |
+==================+=========================================================================================+=========+===================================+==============+============+
| exit             | 0x8D803f7f7e26E586ee90E5A872cf7830e21f7727 (TreasuryExtentions/AURA_ARB_BAL_LP_BIP_322) |       0 | {                                 | BIP-592      | N/A        |
|                  |                                                                                         |         |   "_minOuts": [                   |              |            |
|                  |                                                                                         |         |     [                             |              |            |
|                  |                                                                                         |         |       "36283773870000002039808"   |              |            |
|                  |                                                                                         |         |     ],                            |              |            |
|                  |                                                                                         |         |     [                             |              |            |
|                  |                                                                                         |         |       "2058925925750633987571712" |              |            |
|                  |                                                                                         |         |     ],                            |              |            |
|                  |                                                                                         |         |     [                             |              |            |
|                  |                                                                                         |         |       "128719428660000012107776"  |              |            |
|                  |                                                                                         |         |     ]                             |              |            |
|                  |                                                                                         |         |   ]                               |              |            |
|                  |                                                                                         |         | }                                 |              |            |
+------------------+-----------------------------------------------------------------------------------------+---------+-----------------------------------+--------------+------------+
| withdrawBalances | 0x8D803f7f7e26E586ee90E5A872cf7830e21f7727 (TreasuryExtentions/AURA_ARB_BAL_LP_BIP_322) |       0 | "N/A"                             | BIP-592      | N/A        |
+------------------+-----------------------------------------------------------------------------------------+---------+-----------------------------------+--------------+------------+

@BalancerMaxis BalancerMaxis deleted a comment from github-actions bot Apr 29, 2024
@BalancerMaxis BalancerMaxis deleted a comment from github-actions bot Apr 29, 2024
@BalancerMaxis BalancerMaxis deleted a comment from github-actions bot Apr 29, 2024
…AL-AURA-ARB-Pool-Arbitrum' into BIP-XXX-Exit-and-Withdraw-from-BAL-AURA-ARB-Pool-Arbitrum

# Conflicts:
#	action-scripts/brownie/scripts/script_utils.py
@Tritium-VLK
Copy link
Member

Copy link
Member

@Tritium-VLK Tritium-VLK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes from Mike

…json

Co-authored-by: Tritium <11885129+Tritium-VLK@users.noreply.github.com>
Copy link
Contributor

BIP validation results for file BIPs/2024-W18/BIP-592 Exit and Withdraw from BAL/AURA/BIP-592.json:
Commit: b06befabbad25a024b00fbe73fa17ad91a6fa2e0

+-------------------------------+--------+
|           Validator           | Result |
+-------------------------------+--------+
|     validate_contains_msig    |   OK   |
| validate_msig_in_address_book |   OK   |
|    validate_chain_specified   |   OK   |
|     validate_file_has_bip     |   OK   |
|  validate_path_has_weekly_dir |   OK   |
+-------------------------------+--------+

Copy link
Contributor

FILENAME: BIPs/2024-W18/BIP-592 Exit and Withdraw from BAL/AURA/BIP-592.json
MULTISIG: multisigs/dao (arbitrum:0xaF23DC5983230E9eEAf93280e312e57539D098D0)
COMMIT: b06befabbad25a024b00fbe73fa17ad91a6fa2e0
CHAIN(S): arbitrum
TENDERLY: FAILURE

+------------------+-----------------------------------------------------------------------------------------+---------+------------------------------------+--------------+------------+
| fx_name          | to                                                                                      |   value | inputs                             | bip_number   | tx_index   |
+==================+=========================================================================================+=========+====================================+==============+============+
| exit             | 0x8D803f7f7e26E586ee90E5A872cf7830e21f7727 (TreasuryExtentions/AURA_ARB_BAL_LP_BIP_322) |       0 | {                                  | BIP-592      | N/A        |
|                  |                                                                                         |         |   "_minOuts": [                    |              |            |
|                  |                                                                                         |         |     [                              |              |            |
|                  |                                                                                         |         |       "362837738700000020398080"   |              |            |
|                  |                                                                                         |         |     ],                             |              |            |
|                  |                                                                                         |         |     [                              |              |            |
|                  |                                                                                         |         |       "20589259257506339875717120" |              |            |
|                  |                                                                                         |         |     ],                             |              |            |
|                  |                                                                                         |         |     [                              |              |            |
|                  |                                                                                         |         |       "128719428660000012107776"   |              |            |
|                  |                                                                                         |         |     ]                              |              |            |
|                  |                                                                                         |         |   ]                                |              |            |
|                  |                                                                                         |         | }                                  |              |            |
+------------------+-----------------------------------------------------------------------------------------+---------+------------------------------------+--------------+------------+
| withdrawBalances | 0x8D803f7f7e26E586ee90E5A872cf7830e21f7727 (TreasuryExtentions/AURA_ARB_BAL_LP_BIP_322) |       0 | "N/A"                              | BIP-592      | N/A        |
+------------------+-----------------------------------------------------------------------------------------+---------+------------------------------------+--------------+------------+

@Tritium-VLK
Copy link
Member

Tritium-VLK commented Apr 29, 2024

image

>>> aura=2274285
>>> bal=401210
>>> arb=1424835
>>> [int(0.9e18*bal), int(0.9e18*aura), int(0.9e18*arb)]
[361088999999999976669184, 2046856500000000053346304, 1282351499999999948750848]

…AL-AURA-ARB-Pool-Arbitrum' into BIP-XXX-Exit-and-Withdraw-from-BAL-AURA-ARB-Pool-Arbitrum

# Conflicts:
#	BIPs/2024-W18/BIP-592 Exit and Withdraw from BAL/AURA/BIP-592.json
Copy link
Contributor

BIP validation results for file BIPs/2024-W18/BIP-592 Exit and Withdraw from BAL/AURA/BIP-592.json:
Commit: 73b52d91d578b6343a366274bee4c9f54d2faa51

+-------------------------------+--------+
|           Validator           | Result |
+-------------------------------+--------+
|     validate_contains_msig    |   OK   |
| validate_msig_in_address_book |   OK   |
|    validate_chain_specified   |   OK   |
|     validate_file_has_bip     |   OK   |
|  validate_path_has_weekly_dir |   OK   |
+-------------------------------+--------+

Copy link
Contributor

FILENAME: BIPs/2024-W18/BIP-592 Exit and Withdraw from BAL/AURA/BIP-592.json
MULTISIG: multisigs/dao (arbitrum:0xaF23DC5983230E9eEAf93280e312e57539D098D0)
COMMIT: 73b52d91d578b6343a366274bee4c9f54d2faa51
CHAIN(S): arbitrum
TENDERLY: SUCCESS

+------------------+-----------------------------------------------------------------------------------------+---------+----------------------------------------------------------------------------------------------------------------------+--------------+------------+
| fx_name          | to                                                                                      |   value | inputs                                                                                                               | bip_number   | tx_index   |
+==================+=========================================================================================+=========+======================================================================================================================+==============+============+
| exit             | 0x8D803f7f7e26E586ee90E5A872cf7830e21f7727 (TreasuryExtentions/AURA_ARB_BAL_LP_BIP_322) |       0 | {                                                                                                                    | BIP-592      | N/A        |
|                  |                                                                                         |         |   "_minOuts": [                                                                                                      |              |            |
|                  |                                                                                         |         |     "raw:361088999999999976669184, 18 decimals:361088.999999999976669184, 6 decimals: 361088999999999976.669184",    |              |            |
|                  |                                                                                         |         |     "raw:2046856500000000053346304, 18 decimals:2046856.500000000053346304, 6 decimals: 2046856500000000053.346304", |              |            |
|                  |                                                                                         |         |     "raw:1282351499999999948750848, 18 decimals:1282351.499999999948750848, 6 decimals: 1282351499999999948.750848"  |              |            |
|                  |                                                                                         |         |   ]                                                                                                                  |              |            |
|                  |                                                                                         |         | }                                                                                                                    |              |            |
+------------------+-----------------------------------------------------------------------------------------+---------+----------------------------------------------------------------------------------------------------------------------+--------------+------------+
| withdrawBalances | 0x8D803f7f7e26E586ee90E5A872cf7830e21f7727 (TreasuryExtentions/AURA_ARB_BAL_LP_BIP_322) |       0 | "N/A"                                                                                                                | BIP-592      | N/A        |
+------------------+-----------------------------------------------------------------------------------------+---------+----------------------------------------------------------------------------------------------------------------------+--------------+------------+

@Tritium-VLK Tritium-VLK merged commit bd8ec21 into main Apr 29, 2024
@Tritium-VLK Tritium-VLK deleted the BIP-XXX-Exit-and-Withdraw-from-BAL-AURA-ARB-Pool-Arbitrum branch April 29, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants