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

feat: scripts for assoc and treasury council funding #1492

Merged
merged 7 commits into from
Jan 25, 2024

Conversation

petrovska-petro
Copy link
Collaborator

tackles #1489 and #1491

run:

1st step

brownie run scripts/issue/1489/assoc_and_treasury_council_funding sell_stable_for_usdc

2nd step once cow swaps are settled

brownie run scripts/issue/1489/assoc_and_treasury_council_funding assoc_and_council_funding

@petrovska-petro
Copy link
Collaborator Author

may need addy update from the assoc.msig, once @sajanrajdev has final deets

@sajanrajdev
Copy link
Collaborator

@petrovska-petro, I took the liberty of merging main and changing payments multisig to the new one.

@sajanrajdev
Copy link
Collaborator

sajanrajdev commented Jan 24, 2024

Just wanted to note that the operation will not result in a balance state for stables. This is acceptable as discussed during the Treasury call as the stables balancing and yearly runway coverage are goals to be achieved by the end of each quarter, as per policy. Here is some napkin math on the expect final state:

  • Selling 1,154,912 DAI for 1154948.396852 USDC leaves 34555.62 DAI

With the LUSD sold for USDC, we obtain an additional 682526.398697 USDC.

So, after the trades we will have: 95,651.0265+1154948.396852+682526.398697 = 1,933125.82205 USDC

After the transfers, the USDC amount will be reduced to: 1933125.82205 - (2927.77*5 + 300000 + 1154918) = 463568.97205 USDC

Therefore, the final state will be:

  • 34555.62 DAI
  • 584,807.4172 USDT
  • 463568.97205 USDC
  • 0 LUSD

Swapping ~half of USDT for DAI would do the trick, as previously suggested but it might make sense to wait until a decision around extending the stable runway is made.

Review

  • Performs the swaps described above - LGTM
  • In a separate script, it:
    • Transfers BADGER and USDC q1 Budget to new Assc. Payments Multisig
    • Deposits 300K BADGER on Llamapay contract
    • Transfers make up amount to Treasury Council members
  • Addresses LGTM

@sajanrajdev
Copy link
Collaborator

sajanrajdev commented Jan 24, 2024

@petrovska-petro, I took the liberty of pushing a simulation, assertions and snaphots that I added while reviewing locally. You will find that core logic was left intact, these just add extra sanity and qa.

LGTM

Copy link

@rayeaster rayeaster left a comment

Choose a reason for hiding this comment

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

LGTM to have councillor and streaming setup

"councillor2": "0xae3FB0474841D69AAE9446108F41D01f11E8BeF4",
"councillor3": "0xd1911EEDf284BCD3559de6A06ef67233023e0dFe",
"councillor4": "0x33Dd3EC6CCB2736dc285bde70aADe5C45bFaD588",
"councillor5": "0x3f993093c3917Fe7A117f37cFD008775249f59c8",

Choose a reason for hiding this comment

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

Just curious, councillor1/2/3/4 address looks pretty new and with zero balance (except councillor1 receiving a transfer from CoinBase a few days ago), are they created in advance out of create2 ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Correct, councillors created new accounts in most cases for this purpose. They are all confirmed and the transaction will be ultimately reviewed and confirmed by themselves.

DEADLINE = 60 * 60 * 4

# funding figures (treasury)
TREASURY_COUNCIL_YEARLY_FUNDING = 300_000e6

Choose a reason for hiding this comment

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

this assume USDC precision of 6?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It does, of course it tends to be better to fetch decimals from the source but in this case I think it is safe to hardcode.

@petrovska-petro petrovska-petro merged commit 77d2802 into main Jan 25, 2024
3 checks passed
@petrovska-petro petrovska-petro deleted the feat/assoc-treasury-funding branch January 25, 2024 16:03
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.

3 participants