Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
zfogg committed Nov 19, 2022
2 parents db8bbe4 + d3b43ff commit 1e12de1
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 288 deletions.
21 changes: 8 additions & 13 deletions DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ The Distribution contract gets the total amount of locked BAO in BAOv2 tokens,
reduced by a factor of 1000. The Swapper contract gets the circulating supply
of BAO as BAOv2 tokens, reduced by a factor of 1000.

TODO: these numbers are rough estimates :).

1. `hh bao:ERC20BAO:transfer --from deployer --to BaoDistribution --amount 922240000000000000000000000`
2. `hh bao:ERC20BAO:transfer --from deployer --to Swapper --amount 168740000000000000000000000`

1. `hh bao:ERC20BAO:transfer --from deployer --to BaoDistribution --amount 832364383418932981187447848`
2. `hh bao:ERC20BAO:transfer --from deployer --to Swapper --amount 166850344226331394130869546`
3. `hh bao:ERC20BAO:transfer --from deployer --to $TREASURY --amount 92538492678164717714597057`

### Step 3 - Setup the BAOv2 token

Expand All @@ -47,16 +45,13 @@ the ownership of the VE token.

### Step 5 - Setup the GaugeController:

Add new gauge types (one for crypto, one for stable), add existing gauges to
Add new gauge type, add existing gauges to
controller, and transfer ownership to admin.

TODO: figure out the weights forreal. I think the numbers are wrong!

1. `hh bao:GaugeController:addGaugeType --name 'Ethereum Stable' --weight 1000000000000000000 # This becomes "--type 0"`
2. `hh bao:GaugeController:addGaugeType --name 'Ethereum Crypto' --weight 1000000000000000000 # This becomes "--type 1"`
3. `hh bao:GaugeController:addGauge --type 0 --weight 1000000000000000000 --gauge baoUSD-3CRV`
4. `hh bao:GaugeController:addGauge --type 0 --weight 1000000000000000000 --gauge bSTBL-DAI`
5. `hh bao:GaugeController:addGauge --type 1 --weight 1000000000000000000 --gauge BAO-ETH`
1. `hh bao:GaugeController:addGaugeType --name 'Ethereum' --weight 1000000000000000000 # This becomes "--type 0"`
3. `hh bao:GaugeController:addGauge --type 0 --weight 5000000000000000000 --gauge baoUSD-3CRV`
4. `hh bao:GaugeController:addGauge --type 0 --weight 3000000000000000000 --gauge bSTBL-DAI`
5. `hh bao:GaugeController:addGauge --type 0 --weight 2000000000000000000 --gauge BAO-ETH`
6. `hh bao:GaugeController:changeOwner --admin $TREASURY`


Expand Down
4 changes: 2 additions & 2 deletions contracts/ERC20BAO.vy
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ YEAR: constant(uint256) = 86400 * 365
# supply left for inflation: Y% || **(X + Y = 100%)**

# Supply parameters
INITIAL_SUPPLY_CAP: constant(uint256) = 1_500_000_000 # locked supply + circulating at farm ending ~1.12T + 175B = 1.3T
INITIAL_RATE: constant(uint256) = 274_815_283 * 10 ** 18 / YEAR #X% premine test value, think its close to ~49.5% here
INITIAL_SUPPLY_CAP: constant(uint256) = 1_091_753_221 # locked supply + circulating at farm ending 1,091,753,220.323429093032914451
INITIAL_RATE: constant(uint256) = 230_255_942 * 10 ** 18 / YEAR # ~42% premine
RATE_REDUCTION_TIME: constant(uint256) = YEAR
RATE_REDUCTION_COEFFICIENT: constant(uint256) = 1189207115002721024 #2 ** (1/4) * 1e18
RATE_DENOMINATOR: constant(uint256) = 10 ** 18
Expand Down
2 changes: 1 addition & 1 deletion deploy/01_03_BaoDistribution.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const TREASURY = '0x3dFc49e5112005179Da613BdE5973229082dAc35'
const MERKLE_ROOT = '0x4ed873ef8243a2b4efe73caaffeec8c2577bbf26320a67dc8a8f9c7dab3cd4bd'
const MERKLE_ROOT = '0xbc39affb2a6f4c1e539660ab71ae1554d613a42413e154a6223dd7c868432e58'

module.exports = async ({getNamedAccounts, deployments, ethers}) => {
const { deployer } = await getNamedAccounts()
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from brownie_tokens import ERC20

YEAR = 365 * 86400
INITIAL_RATE = 274_815_283
INITIAL_RATE = 230_255_942
YEAR_1_SUPPLY = INITIAL_RATE * 10 ** 18 // YEAR * YEAR
INITIAL_SUPPLY = 1_500_000_000
INITIAL_SUPPLY = 1_091_753_221


def approx(a, b, precision=1e-10):
Expand Down
268 changes: 0 additions & 268 deletions tests/integration/test_reward_stream_state.py

This file was deleted.

4 changes: 2 additions & 2 deletions tests/unitary/BAO/test_inflation_delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def test_mining_epoch(accounts, chain, token):


def test_available_supply(accounts, chain, token):
assert token.available_supply() == 1_500_000_000 * 10 ** 18
assert token.available_supply() == 1_091_753_221 * 10 ** 18

chain.sleep(86401)
token.update_mining_parameters({"from": accounts[0]})

assert token.available_supply() > 1_500_000_000 * 10 ** 18
assert token.available_supply() > 1_091_753_221 * 10 ** 18

0 comments on commit 1e12de1

Please sign in to comment.