YIP-3 (on DAO v2) - Follow up III on a accept admin from the new DAO

Author: Markus @m.laeng
First publication date: 2024/06/05

NOTE: As pointed out in the blogpost on medium, YIP-3 consists of the exact same lambdas as the predecessor YIPs 0, 1 and 2. Please read up the rationale about why this proposal repeatedly put to vote several times in the blogpost.

This will be the fourth time this is put to vote. The last vote, YIP-2, reduced the needed quorum to 1’064’135.09. Votes assembled in the last vote were 961’674.62. The old pool still has 446’498.71 YOU. So there is still a delta to be closed, which means this might not be the last repetition. But we shall soon be done…

Summary

After YIP-4 did propose the new DAO to become admin on these youves contracts which only accept one admin, the DAO contract needs to now to call acceptAdminProposal on these contracts. This will install the new DAO contract KT1T3BFEu9WSQyRuV9Fyd7SqTU4rW3ptJ3NN as admin. Only then will the new DAO contract be able to change parameters on these contracts.

Rationale

With YIP-4, which sucessfully concluded, the youves community agreed to propose the new DAO contract KT1T3BFEu9WSQyRuV9Fyd7SqTU4rW3ptJ3NN as an administrator to those youves flat curve swaps, which only accept one administrator. This is a necessary step to install the new Commitment Pool KT1ENJfVK98HTRfxjFKPqu1R7tFwXVjmLAo2 as the one and only voting_contract.

YIP-4 did propose the new DAO as admin to those flat curve contracts, which only allow one admin and which have a propose/accept process for replacing admins. YIP-4 did propose the admin change. Now this proposal has to be accepted by the new DAO (the proposed admin).

Therefor this YIP is proposed which will only accept the new DAO as admin on all the contracts where it was proposed in YIP-4.

For all other engines and contracts which can have multiple admins, the youves keyholders will set the new DAO as admin, due to practical reasons. Due to the amount of contracts, the whole process would take several YIPs. Assuming that the acceptance of YIP-4 and YIP-5 signals a general consent on the replacement of DAO and Commitment Pool (aka YOU Staking Pool), such an intervention by the youves keyholders seems to be legitimate.

Methodology

In order to accept the administrator role, the new DAO needs to accept it, by calling acceptAdminProposal on all the contracts which can only have one administrator and where the new DAO is already a proposed Administrator (through YIP-4). These are mainly all the flat curve swap pools plus the Checker contract for CCHF.

This will also remove the old DAO KT1C3T98TqCm38cHPauZ4SopkQ4torCsxgab from being admin on these contracts (as they can only have one administrator at a time).

Proposal

In the table below you can see what effect this proposal will have on youves contracts.

Contract Name Contract Address Entrypoint called Effect
uUSD/USDt flat curve KT1UJBvm4hv11Uvu6r4c8zE5K2EfmwiRVgsm acceptAdminProposal Set the new DAO as admin
USDC.e/uUSD flat curve KT1NgbaaYhtXh3MwJoYYxrrKUwG3RX5LYVL6 acceptAdminProposal Set the new DAO as admin
wUSDC/uUSD flat curve KT1JeWiS8j1kic4PHx7aTnEr9p4xVtJNzk5b acceptAdminProposal Set the new DAO as admin
uBTC/uUSD flat curve KT1STLQKxiRtAh1e7DZhu1xUTAJ7KLpV9Rru acceptAdminProposal Set the new DAO as admin
tzBTC/wwBTC flat curve KT1T974a8qau4xP3RAAWPYCZM9xtwU9FLjPS acceptAdminProposal Set the new DAO as admin
tzBTC/uBTC flat curve KT1XvH5f2ja2jzdDbv6rxPmecZFU7s3obquN acceptAdminProposal Set the new DAO as admin
wBTC.e/uBTC flat curve KT1CkpDuwCFrnoqTam6upYiPBiFNsSEVbBei acceptAdminProposal Set the new DAO as admin
kUSD/uUSD flat curve KT1AVbWyM8E7DptyBCu4B5J5B7Nswkq7Skc6 acceptAdminProposal Set the new DAO as admin
USDtz/uUSD flat curve KT1Xbx9pykNd38zag4yZvnmdSNBknmCETvQV acceptAdminProposal Set the new DAO as admin
uXTZ/xtz flat curve KT1SPUvH5khHtirTEVeECiKrnh4FFXxWZ6ui acceptAdminProposal Set the new DAO as admin
uXTZ/xtz legacy flat curve KT1WgguedKZWucrdRKQXaRECEPMZennaVPck acceptAdminProposal Set the new DAO as admin
uUSD/uXAU flat curve KT1Ad5yJzoiRRdMJPvhJiPJ7Cq8WbJnCS7bg acceptAdminProposal Set the new DAO as admin
uXTZ/xtz legacy flat curve KT1BFXgczFte2zftCTg7tL6Qk2capsFg6UFS acceptAdminProposal Set the new DAO as admin
USDT/xtz KT1PkygK9CqgNLyuJ9iMFcgx1651BrTjN1Q9 acceptAdminProposal Set the new DAO as admin

Code

Source code in SmartPy

GitHub repo with the source code

import smartpy as sp

def execute_accept_administrator_proposal(administrable_address):
    administrable_contract = sp.contract(
        sp.TUnit, administrable_address, entry_point="acceptAdminProposal"
    ).open_some()
    return sp.transfer_operation(sp.unit, sp.mutez(0), administrable_contract)

def YIP5(unit):
    sp.set_type(unit, sp.TUnit)

    sp.result(sp.list([
        execute_accept_administrator_proposal(sp.address("KT1UJBvm4hv11Uvu6r4c8zE5K2EfmwiRVgsm")), # UUSD/USDT
        execute_accept_administrator_proposal(sp.address("KT1NgbaaYhtXh3MwJoYYxrrKUwG3RX5LYVL6")), # USDCE/UUSD
        execute_accept_administrator_proposal(sp.address("KT1JeWiS8j1kic4PHx7aTnEr9p4xVtJNzk5b")), # WUSDC/UUSD
        execute_accept_administrator_proposal(sp.address("KT1STLQKxiRtAh1e7DZhu1xUTAJ7KLpV9Rru")), # UUSD/UBTC
        execute_accept_administrator_proposal(sp.address("KT1T974a8qau4xP3RAAWPYCZM9xtwU9FLjPS")), # tzbtc/wwbtc
        execute_accept_administrator_proposal(sp.address("KT1XvH5f2ja2jzdDbv6rxPmecZFU7s3obquN")), # tzbtc/ubtc
        execute_accept_administrator_proposal(sp.address("KT1CkpDuwCFrnoqTam6upYiPBiFNsSEVbBei")), # wbtc.e/ubtc
        execute_accept_administrator_proposal(sp.address("KT1AVbWyM8E7DptyBCu4B5J5B7Nswkq7Skc6")), # kusd/usd
        execute_accept_administrator_proposal(sp.address("KT1Xbx9pykNd38zag4yZvnmdSNBknmCETvQV")), # usdtz/uusd
        execute_accept_administrator_proposal(sp.address("KT1SPUvH5khHtirTEVeECiKrnh4FFXxWZ6ui")), # xtz/uxtz v2
        execute_accept_administrator_proposal(sp.address("KT1WgguedKZWucrdRKQXaRECEPMZennaVPck")), # xxtz/uxtz
        execute_accept_administrator_proposal(sp.address("KT1Ad5yJzoiRRdMJPvhJiPJ7Cq8WbJnCS7bg")), # uusd/uxau
        execute_accept_administrator_proposal(sp.address("KT1BFXgczFte2zftCTg7tL6Qk2capsFg6UFS")),
        execute_accept_administrator_proposal(sp.address("KT1PkygK9CqgNLyuJ9iMFcgx1651BrTjN1Q9")), # usdt/xtz
    ]))

Compiled Michelson code

{ DROP; NIL operation; PUSH address "KT1PkygK9CqgNLyuJ9iMFcgx1651BrTjN1Q9"; CONTRACT %acceptAdminProposal unit; IF_NONE { PUSH int 258; FAILWITH } {}; PUSH mutez 0; UNIT; TRANSFER_TOKENS; CONS; PUSH address "KT1BFXgczFte2zftCTg7tL6Qk2capsFg6UFS"; CONTRACT %acceptAdminProposal unit; IF_NONE { PUSH int 258; FAILWITH } {}; PUSH mutez 0; UNIT; TRANSFER_TOKENS; CONS; PUSH address "KT1Ad5yJzoiRRdMJPvhJiPJ7Cq8WbJnCS7bg"; CONTRACT %acceptAdminProposal unit; IF_NONE { PUSH int 258; FAILWITH } {}; PUSH mutez 0; UNIT; TRANSFER_TOKENS; CONS; PUSH address "KT1WgguedKZWucrdRKQXaRECEPMZennaVPck"; CONTRACT %acceptAdminProposal unit; IF_NONE { PUSH int 258; FAILWITH } {}; PUSH mutez 0; UNIT; TRANSFER_TOKENS; CONS; PUSH address "KT1SPUvH5khHtirTEVeECiKrnh4FFXxWZ6ui"; CONTRACT %acceptAdminProposal unit; IF_NONE { PUSH int 258; FAILWITH } {}; PUSH mutez 0; UNIT; TRANSFER_TOKENS; CONS; PUSH address "KT1Xbx9pykNd38zag4yZvnmdSNBknmCETvQV"; CONTRACT %acceptAdminProposal unit; IF_NONE { PUSH int 258; FAILWITH } {}; PUSH mutez 0; UNIT; TRANSFER_TOKENS; CONS; PUSH address "KT1AVbWyM8E7DptyBCu4B5J5B7Nswkq7Skc6"; CONTRACT %acceptAdminProposal unit; IF_NONE { PUSH int 258; FAILWITH } {}; PUSH mutez 0; UNIT; TRANSFER_TOKENS; CONS; PUSH address "KT1CkpDuwCFrnoqTam6upYiPBiFNsSEVbBei"; CONTRACT %acceptAdminProposal unit; IF_NONE { PUSH int 258; FAILWITH } {}; PUSH mutez 0; UNIT; TRANSFER_TOKENS; CONS; PUSH address "KT1XvH5f2ja2jzdDbv6rxPmecZFU7s3obquN"; CONTRACT %acceptAdminProposal unit; IF_NONE { PUSH int 258; FAILWITH } {}; PUSH mutez 0; UNIT; TRANSFER_TOKENS; CONS; PUSH address "KT1T974a8qau4xP3RAAWPYCZM9xtwU9FLjPS"; CONTRACT %acceptAdminProposal unit; IF_NONE { PUSH int 258; FAILWITH } {}; PUSH mutez 0; UNIT; TRANSFER_TOKENS; CONS; PUSH address "KT1STLQKxiRtAh1e7DZhu1xUTAJ7KLpV9Rru"; CONTRACT %acceptAdminProposal unit; IF_NONE { PUSH int 258; FAILWITH } {}; PUSH mutez 0; UNIT; TRANSFER_TOKENS; CONS; PUSH address "KT1JeWiS8j1kic4PHx7aTnEr9p4xVtJNzk5b"; CONTRACT %acceptAdminProposal unit; IF_NONE { PUSH int 258; FAILWITH } {}; PUSH mutez 0; UNIT; TRANSFER_TOKENS; CONS; PUSH address "KT1NgbaaYhtXh3MwJoYYxrrKUwG3RX5LYVL6"; CONTRACT %acceptAdminProposal unit; IF_NONE { PUSH int 258; FAILWITH } {}; PUSH mutez 0; UNIT; TRANSFER_TOKENS; CONS; PUSH address "KT1UJBvm4hv11Uvu6r4c8zE5K2EfmwiRVgsm"; CONTRACT %acceptAdminProposal unit; IF_NONE { PUSH int 258; FAILWITH } {}; PUSH mutez 0; UNIT; TRANSFER_TOKENS; CONS }

SHA256 Hash of the Michelson code

5b6b864f88abe71690f6e3175dc52fab8904d65d2dc586825c670c3d0daa6106