Author: @bitxia, Markus @m.laeng
First publication date: 2024/09/04
Summary
This YIP proposes to lower the interest rate on all uBTC engines, from today 3.25594% to 1.6277%, roughly halving the interest charged. Also, the long-term lock (180d) on the uBTC savings pool will be removed, allowing users to remove their uBTC position from the pool.
As an additional houskeeping task of this YIP, the DAO V2 needs to accept his proposed administratorship on the two savings pools for uBTC and uUSD (which has not yet happened).
Rationale
After tzBTC returned to peg, due to the tzBTC bridge, uBTC also has found closer price to BTC. Nevertheless, liquidity on the uBTC/uUSD pool is one sided, with less uBTC value in the pool than uUSD. Same goes for the tzBTC/uBTC pool, where a lot more tzBTC reside than uBTC. One reason for this is the uBTC savings pool, which locks uBTC but does not help the platform to grow in liquidity.
This also makes it difficult for uBTC minters to exit their position, because buying back the uBTC comes with a premium.
Lowering the uBTC interest rate, will make it more attractive for users to mint uBTC, but will also lower the rewards flowing into the uBTC savings pool. This will allow for a shift to more ubTC liquidity and less uBTC locked in the savings pool.
The two savings pools for uBTC and uUSD have a two step process to add an administrator: first a current administrator needs to call propose_administrator
for another future admin, then the future admin needs to be set by calling set_administrator
. The new DAO V2 has already been proposed as administrator to the two savings pools, but now it also needs to accept it by calling set_administrator
on the two pool contracts. These two calls are also included in the lambda below.
Methodology
Interest Rate Change
In order to change the interest rate on all engines, then entrypoint set_reference_interest_rate
needs to be called in all uBTC engines, passing in the new interest rate. To calculate the new interest rate, the following formula has been used:
Interest Rate = (1 + (316+196)/10^12)^(365*24*60*60)
where 316 is the spread rate which is unchangeable and 196 is the new interest rate. This leads to an inetrest rage of 1.6277%.
uBTC Savings Pool Unlock
In order to remove the Savings Pool lock, the entrypoint update_max_release_period
must be called in the uBTC Savings Pool contract KT1WT8hZsixALTmxcM3SDzCyh4UF8hYXVaUb
, passing in 1
second as the new paramater (which is the minimum lock time).
Accept administrator on the uBTC Savings Pool and the uUSD Savings Pool
In order to accept it’s proposed administratorship on the uBTC Savings Pool and the uUSD Savings Pool, the DAO V2 contract needs to call the entrypoint set_administrator
on each of the contracts, means on KT1WT8hZsixALTmxcM3SDzCyh4UF8hYXVaUb
(the uBTC savings pool) and KT18bG4ctcB6rh7gPEPjNsWF8XkQXL2Y1pJe
(the uUSD savings pool).
Proposal
In the table below you can see what effect this proposal will have on youves contracts.
Contract Name | Contract Address | Entrypoint called | Effect |
---|---|---|---|
uBTC with tzBTC V3 0% minting fee | KT18x66448Gt3kYYkfvx4Cg2dP9cRPfjQwVv | set_reference_interest_rate | change reference interest rate to 196 |
uBTC with SIRS V3 0% minting fee | KT1SEjPmaeVPMu4Ep94ggF3tLqzFM83T3pBd | set_reference_interest_rate | change reference interest rate to 196 |
uBTC with tzBTC V3 | KT1XH5rKSd6Ae3DAMYi26gEZP1gxAoQRYRfS | set_reference_interest_rate | change reference interest rate to 196 |
uBTC with SIRS V3 | KT1G6RzVX25YnoU55Xb7Vve3zvuZKmouf24a | set_reference_interest_rate | change reference interest rate to 196 |
uBTC with XTZ V3 | KT1CP1C8afHqdNfBsSE3ggQhzM2iMHd4cRyt | set_reference_interest_rate | change reference interest rate to 196 |
uBTC Savings Pool | KT1WT8hZsixALTmxcM3SDzCyh4UF8hYXVaUb | update_max_release_period | set the max release period to the minimum (1) |
uBTC Savings Pool | KT1WT8hZsixALTmxcM3SDzCyh4UF8hYXVaUb | set_adminstrator | DAO V2 accepts proposed admistratorship |
uUSD Savings Pool | KT18bG4ctcB6rh7gPEPjNsWF8XkQXL2Y1pJe | set_adminstrator | DAO V2 accepts proposed admistratorship |
Code
Source code in SmartPy
GitHub repo with the source code
import smartpy as sp
import utils.addresses as addresses
def execute_set_administrator_unit(administrable_address):
administrable_contract = sp.contract(
sp.TUnit, administrable_address, entry_point="set_administrator"
).open_some()
return sp.transfer_operation(sp.unit, sp.mutez(0), administrable_contract)
def execute_update_max_release_period(contract_address, new_max_release_period):
contract_ep = sp.contract(
sp.TNat, contract_address, entry_point="update_max_release_period"
).open_some()
return sp.transfer_operation(new_max_release_period, sp.mutez(0), contract_ep)
def execute_set_reference_interest_rate(engine, new_interest_rate):
engine_contract = sp.contract(
sp.TNat, engine, entry_point="set_reference_interest_rate"
).open_some()
return sp.transfer_operation(new_interest_rate, sp.mutez(0), engine_contract)
def yip5(unit):
sp.set_type(unit, sp.TUnit)
sp.result(sp.list([
# Pools and farms admin
execute_set_administrator_unit(addresses.UUSD_SAVINGS_POOL),
execute_set_administrator_unit(addresses.UBTC_SAVINGS_POOL),
execute_update_max_release_period(addresses.UBTC_SAVINGS_POOL, sp.nat(1)),
execute_set_reference_interest_rate(addresses.UBTC_TEZ_ENGINE, 196),
execute_set_reference_interest_rate(addresses.UBTC_SIRS_ENGINE, 196),
execute_set_reference_interest_rate(addresses.UBTC_TZBTC_ENGINE, 196),
execute_set_reference_interest_rate(addresses.UBTC_SIRS_ZERO_MINTING_FEE_ENGINE, 196),
execute_set_reference_interest_rate(addresses.UBTC_TZBTC_ZERO_MINTING_FEE_ENGINE, 196),
]))
Compiled Michelson code
GitHub repo with the compiled code
{ DROP; NIL operation; PUSH address "KT18x66448Gt3kYYkfvx4Cg2dP9cRPfjQwVv"; CONTRACT %set_reference_interest_rate nat; IF_NONE { PUSH int 214; FAILWITH } {}; PUSH mutez 0; PUSH nat 196; TRANSFER_TOKENS; CONS; PUSH address "KT1SEjPmaeVPMu4Ep94ggF3tLqzFM83T3pBd"; CONTRACT %set_reference_interest_rate nat; IF_NONE { PUSH int 214; FAILWITH } {}; PUSH mutez 0; PUSH nat 196; TRANSFER_TOKENS; CONS; PUSH address "KT1XH5rKSd6Ae3DAMYi26gEZP1gxAoQRYRfS"; CONTRACT %set_reference_interest_rate nat; IF_NONE { PUSH int 214; FAILWITH } {}; PUSH mutez 0; PUSH nat 196; TRANSFER_TOKENS; CONS; PUSH address "KT1G6RzVX25YnoU55Xb7Vve3zvuZKmouf24a"; CONTRACT %set_reference_interest_rate nat; IF_NONE { PUSH int 214; FAILWITH } {}; PUSH mutez 0; PUSH nat 196; TRANSFER_TOKENS; CONS; PUSH address "KT1CP1C8afHqdNfBsSE3ggQhzM2iMHd4cRyt"; CONTRACT %set_reference_interest_rate nat; IF_NONE { PUSH int 214; FAILWITH } {}; PUSH mutez 0; PUSH nat 196; TRANSFER_TOKENS; CONS; PUSH address "KT1WT8hZsixALTmxcM3SDzCyh4UF8hYXVaUb"; CONTRACT %update_max_release_period nat; IF_NONE { PUSH int 207; FAILWITH } {}; PUSH mutez 0; PUSH nat 1; TRANSFER_TOKENS; CONS; PUSH address "KT1WT8hZsixALTmxcM3SDzCyh4UF8hYXVaUb"; CONTRACT %set_administrator unit; IF_NONE { PUSH int 254; FAILWITH } {}; PUSH mutez 0; UNIT; TRANSFER_TOKENS; CONS; PUSH address "KT18bG4ctcB6rh7gPEPjNsWF8XkQXL2Y1pJe"; CONTRACT %set_administrator unit; IF_NONE { PUSH int 254; FAILWITH } {}; PUSH mutez 0; UNIT; TRANSFER_TOKENS; CONS }
SHA256 Hash of the Michelson code
74557145539401019b754f28daef976a4849c9ab0d1cbe78e87b934c42405bec