diff --git a/bancor_research/bancor_simulator/v3/spec/network.py b/bancor_research/bancor_simulator/v3/spec/network.py
index eb8f7e7..21568fd 100644
--- a/bancor_research/bancor_simulator/v3/spec/network.py
+++ b/bancor_research/bancor_simulator/v3/spec/network.py
@@ -207,8 +207,7 @@ def deposit(
state = deposit_tkn(
state=state, tkn_name=tkn_name, tkn_amt=tkn_amt, user_name=user_name
)
- self.next_transaction(state)
- handle_logging(
+ state = handle_logging(
tkn_name=tkn_name,
tkn_amt=tkn_amt,
action_name=action_name,
@@ -216,6 +215,7 @@ def deposit(
transaction_id=self.transaction_id,
state=state,
)
+ self.next_transaction(state)
def trade(
self,
@@ -240,8 +240,7 @@ def trade(
state = process_trade(
state, tkn_amt, source_token, target_token, user_name, timestamp
)
- self.next_transaction(state)
- handle_logging(
+ state = handle_logging(
source_token + "->" + target_token,
tkn_amt,
transaction_type,
@@ -249,6 +248,7 @@ def trade(
self.transaction_id,
state,
)
+ self.next_transaction(state)
def begin_cooldown_by_rtkn(
self,
@@ -269,10 +269,11 @@ def begin_cooldown_by_rtkn(
id_number = begin_withdrawal_cooldown_by_rtkn(
state, tkn_amt, tkn_name, user_name
)
- self.next_transaction(state)
- handle_logging(
+ state = handle_logging(
tkn_name, tkn_amt, action_name, user_name, self.transaction_id, state
)
+ self.next_transaction(state)
+
return id_number
def begin_cooldown_by_ptkn(
@@ -313,8 +314,6 @@ def withdraw(
state = self.get_state(copy_type="initial", timestamp=timestamp)
tkn_name = state.users[user_name].pending_withdrawals[id_number].tkn_name
state = process_withdrawal(state, user_name, id_number, timestamp)
-
- self.next_transaction(state)
state = handle_logging(
tkn_name,
Decimal(0),
@@ -323,6 +322,7 @@ def withdraw(
self.transaction_id,
state,
)
+ self.next_transaction(state)
def enable_trading(
self,
@@ -342,8 +342,7 @@ def enable_trading(
if bnt_price:
state.price_feeds.at[state.timestamp, "bnt"] = bnt_price
state = enable_trading(state, tkn_name)
- self.next_transaction(state)
- handle_logging(
+ state = handle_logging(
tkn_name,
Decimal("0"),
transaction_type,
@@ -351,6 +350,7 @@ def enable_trading(
state.transaction_id,
state,
)
+ self.next_transaction(state)
def describe(self, decimals: int = -1):
"""
@@ -430,8 +430,7 @@ def whitelist_token(self, tkn_name: str, timestamp: int = 0):
"""
state = self.get_state(copy_type="initial", timestamp=timestamp)
tkn_name = tkn_name.lower()
- state.price_feeds[tkn_name] = [0 for _ in range(len(state.price_feeds))]
-
+ state.price_feeds[tkn_name] = state.price_feeds["bnt"].values
state.create_whitelisted_tkn(tkn_name)
handle_whitelisting_tokens(state)
diff --git a/bancor_research/bancor_simulator/v3/spec/utils.py b/bancor_research/bancor_simulator/v3/spec/utils.py
index a9a9d84..fa0c113 100644
--- a/bancor_research/bancor_simulator/v3/spec/utils.py
+++ b/bancor_research/bancor_simulator/v3/spec/utils.py
@@ -471,45 +471,45 @@ def handle_logging(
"""
state.iter_transaction_id = transaction_id
for tkn_name in state.whitelisted_tokens:
- try:
- state_variables = {
- "timestamp": [state.timestamp],
- "latest_action": [action_name],
- "latest_amt": [tkn_amt],
- "latest_user_name": [user_name],
- "tkn_name": [tkn_name],
- "master_vault_tkn": [get_master_vault_balance(state, tkn_name)],
- "erc20contracts_bntkn": [get_pooltoken_balance(state, tkn_name)],
- "staked_tkn": [get_staked_balance(state, tkn_name)],
- "is_trading_enabled": [get_is_trading_enabled(state, tkn_name)],
- "bnt_trading_liquidity": [get_bnt_trading_liquidity(state, tkn_name)],
- "tkn_trading_liquidity": [get_tkn_trading_liquidity(state, tkn_name)],
- "trading_fee": [get_trading_fee(state, tkn_name)],
- "bnt_funding_limit": [get_bnt_funding_limit(state, tkn_name)],
- "bnt_remaining_funding": [get_bnt_remaining_funding(state, tkn_name)],
- "bnt_funding_amt": [get_bnt_funding_amt(state, tkn_name)],
- "external_protection_vault": [
- get_external_protection_vault_balance(state, tkn_name)
- ],
- "spot_rate": [get_spot_rate(state, tkn_name)],
- "ema_rate": [get_ema_rate(state, tkn_name)],
- "inv_spot_rate": [get_inv_spot_rate(state, tkn_name)],
- "inv_ema_rate": [get_inv_ema_rate(state, tkn_name)],
- "ema_last_updated": [state.tokens[tkn_name].ema_last_updated],
- "network_fee": [state.network_fee],
- "withdrawal_fee": [state.withdrawal_fee],
- "bnt_min_liquidity": [state.bnt_min_liquidity],
- "cooldown_time": [state.cooldown_time],
- "protocol_wallet_bnbnt": [get_protocol_wallet_balance(state, "bnt")],
- "vortex_bnt": [get_vortex_balance(state, "bnt")],
- "erc20contracts_bnbnt": [get_pooltoken_balance(state, "bnt")],
- "master_vault_bnt": [get_master_vault_balance(state, "bnt")],
- "staked_bnt": [get_staked_balance(state, "bnt")],
- "bnbnt_rate": [state.bnbnt_rate],
- }
- state.history.append(DataFrame(state_variables))
- except KeyError:
- pass
+ # try:
+ state_variables = {
+ "timestamp": [state.timestamp],
+ "latest_action": [action_name],
+ "latest_amt": [tkn_amt],
+ "latest_user_name": [user_name],
+ "tkn_name": [tkn_name],
+ "master_vault_tkn": [get_master_vault_balance(state, tkn_name)],
+ "erc20contracts_bntkn": [get_pooltoken_balance(state, tkn_name)],
+ "staked_tkn": [get_staked_balance(state, tkn_name)],
+ "is_trading_enabled": [get_is_trading_enabled(state, tkn_name)],
+ "bnt_trading_liquidity": [get_bnt_trading_liquidity(state, tkn_name)],
+ "tkn_trading_liquidity": [get_tkn_trading_liquidity(state, tkn_name)],
+ "trading_fee": [get_trading_fee(state, tkn_name)],
+ "bnt_funding_limit": [get_bnt_funding_limit(state, tkn_name)],
+ "bnt_remaining_funding": [get_bnt_remaining_funding(state, tkn_name)],
+ "bnt_funding_amt": [get_bnt_funding_amt(state, tkn_name)],
+ "external_protection_vault": [
+ get_external_protection_vault_balance(state, tkn_name)
+ ],
+ "spot_rate": [get_spot_rate(state, tkn_name)],
+ "ema_rate": [get_ema_rate(state, tkn_name)],
+ "inv_spot_rate": [get_inv_spot_rate(state, tkn_name)],
+ "inv_ema_rate": [get_inv_ema_rate(state, tkn_name)],
+ "ema_last_updated": [state.tokens[tkn_name].ema_last_updated],
+ "network_fee": [state.network_fee],
+ "withdrawal_fee": [state.withdrawal_fee],
+ "bnt_min_liquidity": [state.bnt_min_liquidity],
+ "cooldown_time": [state.cooldown_time],
+ "protocol_wallet_bnbnt": [get_protocol_wallet_balance(state, "bnt")],
+ "vortex_bnt": [get_vortex_balance(state, "bnt")],
+ "erc20contracts_bnbnt": [get_pooltoken_balance(state, "bnt")],
+ "master_vault_bnt": [get_master_vault_balance(state, "bnt")],
+ "staked_bnt": [get_staked_balance(state, "bnt")],
+ "bnbnt_rate": [state.bnbnt_rate],
+ }
+ state.history.append(DataFrame(state_variables))
+ # except KeyError:
+ # pass
return state
diff --git a/examples/artifacts/User Actions and State Transition Functions - (pt 1 of 4).ipynb b/examples/artifacts/User Actions and State Transition Functions - (pt 1 of 4).ipynb
new file mode 100644
index 0000000..da22b7d
--- /dev/null
+++ b/examples/artifacts/User Actions and State Transition Functions - (pt 1 of 4).ipynb
@@ -0,0 +1,4681 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 70,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "from bancor_research.bancor_simulator.v3.spec.state import *\n",
+ "from bancor_research.bancor_simulator.v3.spec.network import BancorDapp"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 71,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " bnt | \n",
+ " eth | \n",
+ " link | \n",
+ " tkn | \n",
+ " wbtc | \n",
+ " bnbnt | \n",
+ " bneth | \n",
+ " bnlink | \n",
+ " bntkn | \n",
+ " bnwbtc | \n",
+ " vbnt | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 2 | \n",
+ " Pool | \n",
+ " a: TKN Staked Balance | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " b: TKN Trading Liquidity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " c: BNT Trading Liquidity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " d: BNT Current Funding | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " e: Spot Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " f: Average Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " g: Average Inverse Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " Network | \n",
+ " BNT Staked Balance | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Master Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Protection Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Protocol Equity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Rewards Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " bnt eth link tkn wbtc bnbnt bneth bnlink \\\n",
+ "2 Pool a: TKN Staked Balance 0 0 0 0 0 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 0 0 0 \n",
+ " Master Vault 0 0 0 0 0 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 0 0 0 \n",
+ "\n",
+ " bntkn bnwbtc vbnt \n",
+ "2 Pool a: TKN Staked Balance 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 \n",
+ " e: Spot Rate 0 0 0 \n",
+ " f: Average Rate 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 \n",
+ " Master Vault 0 0 0 \n",
+ " Protection Vault 0 0 0 \n",
+ " Protocol Equity 0 0 0 \n",
+ " Rewards Vault 0 0 0 "
+ ]
+ },
+ "execution_count": 71,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "v3 = BancorDapp()\n",
+ "v3.describe()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 72,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " bnt | \n",
+ " eth | \n",
+ " link | \n",
+ " tkn | \n",
+ " wbtc | \n",
+ " usdc | \n",
+ " bnbnt | \n",
+ " bneth | \n",
+ " bnlink | \n",
+ " bntkn | \n",
+ " bnwbtc | \n",
+ " bnusdc | \n",
+ " vbnt | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 2 | \n",
+ " Pool | \n",
+ " a: TKN Staked Balance | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " b: TKN Trading Liquidity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " c: BNT Trading Liquidity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " d: BNT Current Funding | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " e: Spot Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " f: Average Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " g: Average Inverse Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " Network | \n",
+ " BNT Staked Balance | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Master Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Protection Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Protocol Equity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Rewards Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " bnt eth link tkn wbtc usdc bnbnt bneth \\\n",
+ "2 Pool a: TKN Staked Balance 0 0 0 0 0 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 0 0 0 \n",
+ " Master Vault 0 0 0 0 0 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 0 0 0 \n",
+ "\n",
+ " bnlink bntkn bnwbtc bnusdc vbnt \n",
+ "2 Pool a: TKN Staked Balance 0 0 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 \n",
+ " Master Vault 0 0 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 "
+ ]
+ },
+ "execution_count": 72,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "v3.whitelist_token('usdc')\n",
+ "v3.describe()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 58,
+ "metadata": {
+ "pycharm": {
+ "name": "#%%\n"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "{'eth': {'decimals': 18,\n",
+ " 'trading_fee': Decimal('0.01'),\n",
+ " 'bnt_funding_limit': Decimal('1000000'),\n",
+ " 'ep_vault_balance': Decimal('0')},\n",
+ " 'link': {'decimals': 18,\n",
+ " 'trading_fee': Decimal('0.01'),\n",
+ " 'bnt_funding_limit': Decimal('1000000'),\n",
+ " 'ep_vault_balance': Decimal('0')},\n",
+ " 'tkn': {'decimals': 18,\n",
+ " 'trading_fee': Decimal('0.01'),\n",
+ " 'bnt_funding_limit': Decimal('1000000'),\n",
+ " 'ep_vault_balance': Decimal('0')},\n",
+ " 'wbtc': {'decimals': 18,\n",
+ " 'trading_fee': Decimal('0.01'),\n",
+ " 'bnt_funding_limit': Decimal('1000000'),\n",
+ " 'ep_vault_balance': Decimal('0')},\n",
+ " 'usdc': {'decimals': 18,\n",
+ " 'trading_fee': Decimal('0.01'),\n",
+ " 'bnt_funding_limit': Decimal('1000000'),\n",
+ " 'ep_vault_balance': '0'}}"
+ ]
+ },
+ "execution_count": 58,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "state = v3.get_state()\n",
+ "state.whitelisted_tokens"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 73,
+ "metadata": {
+ "pycharm": {
+ "name": "#%%\n"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "{}"
+ ]
+ },
+ "execution_count": 73,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "state.users"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 74,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "v3.whitelist_token('usdt')\n",
+ "v3.whitelist_token('dai')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 75,
+ "metadata": {
+ "pycharm": {
+ "name": "#%%\n"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " bnt | \n",
+ " eth | \n",
+ " link | \n",
+ " tkn | \n",
+ " wbtc | \n",
+ " usdc | \n",
+ " usdt | \n",
+ " dai | \n",
+ " bnbnt | \n",
+ " bneth | \n",
+ " bnlink | \n",
+ " bntkn | \n",
+ " bnwbtc | \n",
+ " bnusdc | \n",
+ " bnusdt | \n",
+ " bndai | \n",
+ " vbnt | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 1 | \n",
+ " Account | \n",
+ " Alice | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Bob | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " Pool | \n",
+ " a: TKN Staked Balance | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " b: TKN Trading Liquidity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " c: BNT Trading Liquidity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " d: BNT Current Funding | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " e: Spot Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " f: Average Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " g: Average Inverse Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " Network | \n",
+ " BNT Staked Balance | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Master Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Protection Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Protocol Equity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Rewards Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " bnt eth link tkn wbtc \\\n",
+ "1 Account Alice 1000000 1000000 1000000 0 0 \n",
+ " Bob 1000000 1000000 1000000 0 0 \n",
+ "2 Pool a: TKN Staked Balance 0 0 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 \n",
+ " Master Vault 0 0 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 \n",
+ "\n",
+ " usdc usdt dai bnbnt bneth \\\n",
+ "1 Account Alice 1000000 1000000 1000000 0 0 \n",
+ " Bob 1000000 1000000 1000000 0 0 \n",
+ "2 Pool a: TKN Staked Balance 0 0 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 \n",
+ " Master Vault 0 0 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 \n",
+ "\n",
+ " bnlink bntkn bnwbtc bnusdc bnusdt bndai \\\n",
+ "1 Account Alice 0 0 0 0 0 0 \n",
+ " Bob 0 0 0 0 0 0 \n",
+ "2 Pool a: TKN Staked Balance 0 0 0 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 0 \n",
+ " Master Vault 0 0 0 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 0 \n",
+ "\n",
+ " vbnt \n",
+ "1 Account Alice 0 \n",
+ " Bob 0 \n",
+ "2 Pool a: TKN Staked Balance 0 \n",
+ " b: TKN Trading Liquidity 0 \n",
+ " c: BNT Trading Liquidity 0 \n",
+ " d: BNT Current Funding 0 \n",
+ " e: Spot Rate 0 \n",
+ " f: Average Rate 0 \n",
+ " g: Average Inverse Rate 0 \n",
+ "3 Network BNT Staked Balance 0 \n",
+ " Master Vault 0 \n",
+ " Protection Vault 0 \n",
+ " Protocol Equity 0 \n",
+ " Rewards Vault 0 "
+ ]
+ },
+ "execution_count": 75,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# Create the users\n",
+ "v3.create_user('Alice')\n",
+ "\n",
+ "# Set the initial starting balances\n",
+ "v3.set_user_balance(user_name='Alice', tkn_name='eth',tkn_amt=1000000)\n",
+ "v3.set_user_balance(user_name='Alice', tkn_name='link',tkn_amt=1000000)\n",
+ "v3.set_user_balance(user_name='Alice', tkn_name='bnt',tkn_amt=1000000)\n",
+ "v3.set_user_balance(user_name='Alice', tkn_name='usdc',tkn_amt=1000000)\n",
+ "v3.set_user_balance(user_name='Alice', tkn_name='usdt',tkn_amt=1000000)\n",
+ "v3.set_user_balance(user_name='Alice', tkn_name='dai',tkn_amt=1000000)\n",
+ "\n",
+ "v3.create_user('Bob')\n",
+ "\n",
+ "# Set the initial starting balances\n",
+ "v3.set_user_balance(user_name='Bob', tkn_name='eth',tkn_amt=1000000)\n",
+ "v3.set_user_balance(user_name='Bob', tkn_name='link',tkn_amt=1000000)\n",
+ "v3.set_user_balance(user_name='Bob', tkn_name='bnt',tkn_amt=1000000)\n",
+ "v3.set_user_balance(user_name='Bob', tkn_name='usdc',tkn_amt=1000000)\n",
+ "v3.set_user_balance(user_name='Bob', tkn_name='usdt',tkn_amt=1000000)\n",
+ "v3.set_user_balance(user_name='Bob', tkn_name='dai',tkn_amt=1000000)\n",
+ "\n",
+ "v3.describe()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 76,
+ "metadata": {
+ "pycharm": {
+ "name": "#%%\n"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " bnt | \n",
+ " eth | \n",
+ " link | \n",
+ " tkn | \n",
+ " wbtc | \n",
+ " usdc | \n",
+ " usdt | \n",
+ " dai | \n",
+ " bnbnt | \n",
+ " bneth | \n",
+ " bnlink | \n",
+ " bntkn | \n",
+ " bnwbtc | \n",
+ " bnusdc | \n",
+ " bnusdt | \n",
+ " bndai | \n",
+ " vbnt | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 1 | \n",
+ " Account | \n",
+ " Alice | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Bob | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " Pool | \n",
+ " a: TKN Staked Balance | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " b: TKN Trading Liquidity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " c: BNT Trading Liquidity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " d: BNT Current Funding | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " e: Spot Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " f: Average Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " g: Average Inverse Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " Network | \n",
+ " BNT Staked Balance | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Master Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Protection Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Protocol Equity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Rewards Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " bnt eth link tkn wbtc \\\n",
+ "1 Account Alice 1000000 1000000 1000000 0 0 \n",
+ " Bob 1000000 1000000 1000000 0 0 \n",
+ "2 Pool a: TKN Staked Balance 0 0 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 \n",
+ " Master Vault 0 0 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 \n",
+ "\n",
+ " usdc usdt dai bnbnt bneth \\\n",
+ "1 Account Alice 500000 1000000 1000000 0 0 \n",
+ " Bob 1000000 1000000 1000000 0 0 \n",
+ "2 Pool a: TKN Staked Balance 500000 0 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 \n",
+ " Master Vault 500000 0 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 \n",
+ "\n",
+ " bnlink bntkn bnwbtc bnusdc bnusdt bndai \\\n",
+ "1 Account Alice 0 0 0 500000 0 0 \n",
+ " Bob 0 0 0 0 0 0 \n",
+ "2 Pool a: TKN Staked Balance 0 0 0 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 0 \n",
+ " Master Vault 0 0 0 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 0 \n",
+ "\n",
+ " vbnt \n",
+ "1 Account Alice 0 \n",
+ " Bob 0 \n",
+ "2 Pool a: TKN Staked Balance 0 \n",
+ " b: TKN Trading Liquidity 0 \n",
+ " c: BNT Trading Liquidity 0 \n",
+ " d: BNT Current Funding 0 \n",
+ " e: Spot Rate 0 \n",
+ " f: Average Rate 0 \n",
+ " g: Average Inverse Rate 0 \n",
+ "3 Network BNT Staked Balance 0 \n",
+ " Master Vault 0 \n",
+ " Protection Vault 0 \n",
+ " Protocol Equity 0 \n",
+ " Rewards Vault 0 "
+ ]
+ },
+ "execution_count": 76,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "v3.deposit('usdc', '500000', 'Alice', timestamp=0)\n",
+ "v3.describe()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 77,
+ "metadata": {
+ "pycharm": {
+ "name": "#%%\n"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " bnt | \n",
+ " eth | \n",
+ " link | \n",
+ " tkn | \n",
+ " wbtc | \n",
+ " usdc | \n",
+ " usdt | \n",
+ " dai | \n",
+ " bnbnt | \n",
+ " bneth | \n",
+ " bnlink | \n",
+ " bntkn | \n",
+ " bnwbtc | \n",
+ " bnusdc | \n",
+ " bnusdt | \n",
+ " bndai | \n",
+ " vbnt | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 1 | \n",
+ " Account | \n",
+ " Alice | \n",
+ " 1000000 | \n",
+ " 950000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 50000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Bob | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " Pool | \n",
+ " a: TKN Staked Balance | \n",
+ " 0 | \n",
+ " 50000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " b: TKN Trading Liquidity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " c: BNT Trading Liquidity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " d: BNT Current Funding | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " e: Spot Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " f: Average Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " g: Average Inverse Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " Network | \n",
+ " BNT Staked Balance | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Master Vault | \n",
+ " 0 | \n",
+ " 50000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Protection Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Protocol Equity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Rewards Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " bnt eth link tkn wbtc \\\n",
+ "1 Account Alice 1000000 950000 1000000 0 0 \n",
+ " Bob 1000000 1000000 1000000 0 0 \n",
+ "2 Pool a: TKN Staked Balance 0 50000 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 \n",
+ " Master Vault 0 50000 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 \n",
+ "\n",
+ " usdc usdt dai bnbnt bneth \\\n",
+ "1 Account Alice 500000 1000000 1000000 0 50000 \n",
+ " Bob 1000000 1000000 1000000 0 0 \n",
+ "2 Pool a: TKN Staked Balance 500000 0 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 \n",
+ " Master Vault 500000 0 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 \n",
+ "\n",
+ " bnlink bntkn bnwbtc bnusdc bnusdt bndai \\\n",
+ "1 Account Alice 0 0 0 500000 0 0 \n",
+ " Bob 0 0 0 0 0 0 \n",
+ "2 Pool a: TKN Staked Balance 0 0 0 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 0 \n",
+ " Master Vault 0 0 0 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 0 \n",
+ "\n",
+ " vbnt \n",
+ "1 Account Alice 0 \n",
+ " Bob 0 \n",
+ "2 Pool a: TKN Staked Balance 0 \n",
+ " b: TKN Trading Liquidity 0 \n",
+ " c: BNT Trading Liquidity 0 \n",
+ " d: BNT Current Funding 0 \n",
+ " e: Spot Rate 0 \n",
+ " f: Average Rate 0 \n",
+ " g: Average Inverse Rate 0 \n",
+ "3 Network BNT Staked Balance 0 \n",
+ " Master Vault 0 \n",
+ " Protection Vault 0 \n",
+ " Protocol Equity 0 \n",
+ " Rewards Vault 0 "
+ ]
+ },
+ "execution_count": 77,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "v3.deposit('eth', '50000', 'Alice', timestamp=0)\n",
+ "v3.describe()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 78,
+ "metadata": {
+ "pycharm": {
+ "name": "#%%\n"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " bnt | \n",
+ " eth | \n",
+ " link | \n",
+ " tkn | \n",
+ " wbtc | \n",
+ " usdc | \n",
+ " usdt | \n",
+ " dai | \n",
+ " bnbnt | \n",
+ " bneth | \n",
+ " bnlink | \n",
+ " bntkn | \n",
+ " bnwbtc | \n",
+ " bnusdc | \n",
+ " bnusdt | \n",
+ " bndai | \n",
+ " vbnt | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 1 | \n",
+ " Account | \n",
+ " Alice | \n",
+ " 1000000 | \n",
+ " 950000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 50000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Bob | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 500000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " Pool | \n",
+ " a: TKN Staked Balance | \n",
+ " 0 | \n",
+ " 50000 | \n",
+ " 500000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " b: TKN Trading Liquidity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " c: BNT Trading Liquidity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " d: BNT Current Funding | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " e: Spot Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " f: Average Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " g: Average Inverse Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " Network | \n",
+ " BNT Staked Balance | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Master Vault | \n",
+ " 0 | \n",
+ " 50000 | \n",
+ " 500000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Protection Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Protocol Equity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Rewards Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " bnt eth link tkn wbtc \\\n",
+ "1 Account Alice 1000000 950000 1000000 0 0 \n",
+ " Bob 1000000 1000000 500000 0 0 \n",
+ "2 Pool a: TKN Staked Balance 0 50000 500000 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 \n",
+ " Master Vault 0 50000 500000 0 0 \n",
+ " Protection Vault 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 \n",
+ "\n",
+ " usdc usdt dai bnbnt bneth \\\n",
+ "1 Account Alice 500000 1000000 1000000 0 50000 \n",
+ " Bob 1000000 1000000 1000000 0 0 \n",
+ "2 Pool a: TKN Staked Balance 500000 0 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 \n",
+ " Master Vault 500000 0 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 \n",
+ "\n",
+ " bnlink bntkn bnwbtc bnusdc bnusdt bndai \\\n",
+ "1 Account Alice 0 0 0 500000 0 0 \n",
+ " Bob 500000 0 0 0 0 0 \n",
+ "2 Pool a: TKN Staked Balance 0 0 0 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 0 \n",
+ " Master Vault 0 0 0 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 0 \n",
+ "\n",
+ " vbnt \n",
+ "1 Account Alice 0 \n",
+ " Bob 0 \n",
+ "2 Pool a: TKN Staked Balance 0 \n",
+ " b: TKN Trading Liquidity 0 \n",
+ " c: BNT Trading Liquidity 0 \n",
+ " d: BNT Current Funding 0 \n",
+ " e: Spot Rate 0 \n",
+ " f: Average Rate 0 \n",
+ " g: Average Inverse Rate 0 \n",
+ "3 Network BNT Staked Balance 0 \n",
+ " Master Vault 0 \n",
+ " Protection Vault 0 \n",
+ " Protocol Equity 0 \n",
+ " Rewards Vault 0 "
+ ]
+ },
+ "execution_count": 78,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "v3.deposit('link', '500000', 'Bob', timestamp=0)\n",
+ "v3.describe()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 79,
+ "metadata": {
+ "pycharm": {
+ "name": "#%%\n"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " bnt | \n",
+ " eth | \n",
+ " link | \n",
+ " tkn | \n",
+ " wbtc | \n",
+ " usdc | \n",
+ " usdt | \n",
+ " dai | \n",
+ " bnbnt | \n",
+ " bneth | \n",
+ " bnlink | \n",
+ " bntkn | \n",
+ " bnwbtc | \n",
+ " bnusdc | \n",
+ " bnusdt | \n",
+ " bndai | \n",
+ " vbnt | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 1 | \n",
+ " Account | \n",
+ " Alice | \n",
+ " 1000000 | \n",
+ " 950000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 50000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Bob | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 450000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 550000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " Pool | \n",
+ " a: TKN Staked Balance | \n",
+ " 0 | \n",
+ " 50000 | \n",
+ " 550000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " b: TKN Trading Liquidity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " c: BNT Trading Liquidity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " d: BNT Current Funding | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " e: Spot Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " f: Average Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " g: Average Inverse Rate | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " Network | \n",
+ " BNT Staked Balance | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Master Vault | \n",
+ " 0 | \n",
+ " 50000 | \n",
+ " 550000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 500000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Protection Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Protocol Equity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Rewards Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " bnt eth link tkn wbtc \\\n",
+ "1 Account Alice 1000000 950000 1000000 0 0 \n",
+ " Bob 1000000 1000000 450000 0 0 \n",
+ "2 Pool a: TKN Staked Balance 0 50000 550000 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 \n",
+ " Master Vault 0 50000 550000 0 0 \n",
+ " Protection Vault 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 \n",
+ "\n",
+ " usdc usdt dai bnbnt bneth \\\n",
+ "1 Account Alice 500000 1000000 1000000 0 50000 \n",
+ " Bob 1000000 1000000 1000000 0 0 \n",
+ "2 Pool a: TKN Staked Balance 500000 0 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 \n",
+ " Master Vault 500000 0 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 \n",
+ "\n",
+ " bnlink bntkn bnwbtc bnusdc bnusdt bndai \\\n",
+ "1 Account Alice 0 0 0 500000 0 0 \n",
+ " Bob 550000 0 0 0 0 0 \n",
+ "2 Pool a: TKN Staked Balance 0 0 0 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 0 \n",
+ " Master Vault 0 0 0 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 0 \n",
+ "\n",
+ " vbnt \n",
+ "1 Account Alice 0 \n",
+ " Bob 0 \n",
+ "2 Pool a: TKN Staked Balance 0 \n",
+ " b: TKN Trading Liquidity 0 \n",
+ " c: BNT Trading Liquidity 0 \n",
+ " d: BNT Current Funding 0 \n",
+ " e: Spot Rate 0 \n",
+ " f: Average Rate 0 \n",
+ " g: Average Inverse Rate 0 \n",
+ "3 Network BNT Staked Balance 0 \n",
+ " Master Vault 0 \n",
+ " Protection Vault 0 \n",
+ " Protocol Equity 0 \n",
+ " Rewards Vault 0 "
+ ]
+ },
+ "execution_count": 79,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "v3.deposit('link', '50000', 'Bob', timestamp=1)\n",
+ "v3.describe()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 80,
+ "metadata": {
+ "pycharm": {
+ "name": "#%%\n"
+ }
+ },
+ "outputs": [],
+ "source": [
+ "v3.enable_trading('link')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 81,
+ "metadata": {
+ "pycharm": {
+ "name": "#%%\n"
+ }
+ },
+ "outputs": [],
+ "source": [
+ "v3.enable_trading('eth')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 82,
+ "metadata": {
+ "pycharm": {
+ "name": "#%%\n"
+ }
+ },
+ "outputs": [],
+ "source": [
+ "v3.enable_trading('usdc')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 83,
+ "metadata": {
+ "pycharm": {
+ "name": "#%%\n"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " timestamp | \n",
+ " latest_action | \n",
+ " latest_amt | \n",
+ " latest_user_name | \n",
+ " tkn_name | \n",
+ " master_vault_tkn | \n",
+ " erc20contracts_bntkn | \n",
+ " staked_tkn | \n",
+ " is_trading_enabled | \n",
+ " bnt_trading_liquidity | \n",
+ " ... | \n",
+ " network_fee | \n",
+ " withdrawal_fee | \n",
+ " bnt_min_liquidity | \n",
+ " cooldown_time | \n",
+ " protocol_wallet_bnbnt | \n",
+ " vortex_bnt | \n",
+ " erc20contracts_bnbnt | \n",
+ " master_vault_bnt | \n",
+ " staked_bnt | \n",
+ " bnbnt_rate | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 500000 | \n",
+ " Alice | \n",
+ " eth | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 500000 | \n",
+ " Alice | \n",
+ " link | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 500000 | \n",
+ " Alice | \n",
+ " tkn | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 500000 | \n",
+ " Alice | \n",
+ " wbtc | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 500000 | \n",
+ " Alice | \n",
+ " usdc | \n",
+ " 500000 | \n",
+ " 500000 | \n",
+ " 500000 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 500000 | \n",
+ " Alice | \n",
+ " usdt | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 500000 | \n",
+ " Alice | \n",
+ " dai | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 50000 | \n",
+ " Alice | \n",
+ " eth | \n",
+ " 50000 | \n",
+ " 50000 | \n",
+ " 50000 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 50000 | \n",
+ " Alice | \n",
+ " link | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 50000 | \n",
+ " Alice | \n",
+ " tkn | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 50000 | \n",
+ " Alice | \n",
+ " wbtc | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 50000 | \n",
+ " Alice | \n",
+ " usdc | \n",
+ " 500000 | \n",
+ " 500000 | \n",
+ " 500000 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 50000 | \n",
+ " Alice | \n",
+ " usdt | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 50000 | \n",
+ " Alice | \n",
+ " dai | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 500000 | \n",
+ " Bob | \n",
+ " eth | \n",
+ " 50000 | \n",
+ " 50000 | \n",
+ " 50000 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 500000 | \n",
+ " Bob | \n",
+ " link | \n",
+ " 500000 | \n",
+ " 500000 | \n",
+ " 500000 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 500000 | \n",
+ " Bob | \n",
+ " tkn | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 500000 | \n",
+ " Bob | \n",
+ " wbtc | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 500000 | \n",
+ " Bob | \n",
+ " usdc | \n",
+ " 500000 | \n",
+ " 500000 | \n",
+ " 500000 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 500000 | \n",
+ " Bob | \n",
+ " usdt | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 500000 | \n",
+ " Bob | \n",
+ " dai | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 50000 | \n",
+ " Bob | \n",
+ " eth | \n",
+ " 50000 | \n",
+ " 50000 | \n",
+ " 50000 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 50000 | \n",
+ " Bob | \n",
+ " link | \n",
+ " 550000 | \n",
+ " 550000 | \n",
+ " 550000 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 50000 | \n",
+ " Bob | \n",
+ " tkn | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 50000 | \n",
+ " Bob | \n",
+ " wbtc | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 50000 | \n",
+ " Bob | \n",
+ " usdc | \n",
+ " 500000 | \n",
+ " 500000 | \n",
+ " 500000 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 50000 | \n",
+ " Bob | \n",
+ " usdt | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " deposit | \n",
+ " 50000 | \n",
+ " Bob | \n",
+ " dai | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " eth | \n",
+ " 50000 | \n",
+ " 50000 | \n",
+ " 50000 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 20000 | \n",
+ " 0 | \n",
+ " 20000 | \n",
+ " 20000 | \n",
+ " 20000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " link | \n",
+ " 550000 | \n",
+ " 550000 | \n",
+ " 550000 | \n",
+ " True | \n",
+ " 20000 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 20000 | \n",
+ " 0 | \n",
+ " 20000 | \n",
+ " 20000 | \n",
+ " 20000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " tkn | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 20000 | \n",
+ " 0 | \n",
+ " 20000 | \n",
+ " 20000 | \n",
+ " 20000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " wbtc | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 20000 | \n",
+ " 0 | \n",
+ " 20000 | \n",
+ " 20000 | \n",
+ " 20000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " usdc | \n",
+ " 500000 | \n",
+ " 500000 | \n",
+ " 500000 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 20000 | \n",
+ " 0 | \n",
+ " 20000 | \n",
+ " 20000 | \n",
+ " 20000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " usdt | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 20000 | \n",
+ " 0 | \n",
+ " 20000 | \n",
+ " 20000 | \n",
+ " 20000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " dai | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 20000 | \n",
+ " 0 | \n",
+ " 20000 | \n",
+ " 20000 | \n",
+ " 20000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " eth | \n",
+ " 50000 | \n",
+ " 50000 | \n",
+ " 50000 | \n",
+ " True | \n",
+ " 20000 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 40000 | \n",
+ " 0 | \n",
+ " 40000 | \n",
+ " 40000 | \n",
+ " 40000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " link | \n",
+ " 550000 | \n",
+ " 550000 | \n",
+ " 550000 | \n",
+ " True | \n",
+ " 20000 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 40000 | \n",
+ " 0 | \n",
+ " 40000 | \n",
+ " 40000 | \n",
+ " 40000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " tkn | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 40000 | \n",
+ " 0 | \n",
+ " 40000 | \n",
+ " 40000 | \n",
+ " 40000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " wbtc | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 40000 | \n",
+ " 0 | \n",
+ " 40000 | \n",
+ " 40000 | \n",
+ " 40000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " usdc | \n",
+ " 500000 | \n",
+ " 500000 | \n",
+ " 500000 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 40000 | \n",
+ " 0 | \n",
+ " 40000 | \n",
+ " 40000 | \n",
+ " 40000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " usdt | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 40000 | \n",
+ " 0 | \n",
+ " 40000 | \n",
+ " 40000 | \n",
+ " 40000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " dai | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 40000 | \n",
+ " 0 | \n",
+ " 40000 | \n",
+ " 40000 | \n",
+ " 40000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " eth | \n",
+ " 50000 | \n",
+ " 50000 | \n",
+ " 50000 | \n",
+ " True | \n",
+ " 20000 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 60000 | \n",
+ " 0 | \n",
+ " 60000 | \n",
+ " 60000 | \n",
+ " 60000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " link | \n",
+ " 550000 | \n",
+ " 550000 | \n",
+ " 550000 | \n",
+ " True | \n",
+ " 20000 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 60000 | \n",
+ " 0 | \n",
+ " 60000 | \n",
+ " 60000 | \n",
+ " 60000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " tkn | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 60000 | \n",
+ " 0 | \n",
+ " 60000 | \n",
+ " 60000 | \n",
+ " 60000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " wbtc | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 60000 | \n",
+ " 0 | \n",
+ " 60000 | \n",
+ " 60000 | \n",
+ " 60000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " usdc | \n",
+ " 500000 | \n",
+ " 500000 | \n",
+ " 500000 | \n",
+ " True | \n",
+ " 20000 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 60000 | \n",
+ " 0 | \n",
+ " 60000 | \n",
+ " 60000 | \n",
+ " 60000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " usdt | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 60000 | \n",
+ " 0 | \n",
+ " 60000 | \n",
+ " 60000 | \n",
+ " 60000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ " 0 | \n",
+ " 0 | \n",
+ " enableTrading | \n",
+ " 0 | \n",
+ " protocol | \n",
+ " dai | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " False | \n",
+ " 0 | \n",
+ " ... | \n",
+ " 0.2 | \n",
+ " 0.0025 | \n",
+ " 10000 | \n",
+ " 604800 | \n",
+ " 60000 | \n",
+ " 0 | \n",
+ " 60000 | \n",
+ " 60000 | \n",
+ " 60000 | \n",
+ " 1 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
49 rows × 31 columns
\n",
+ "
"
+ ],
+ "text/plain": [
+ " timestamp latest_action latest_amt latest_user_name tkn_name \\\n",
+ "0 0 deposit 500000 Alice eth \n",
+ "0 0 deposit 500000 Alice link \n",
+ "0 0 deposit 500000 Alice tkn \n",
+ "0 0 deposit 500000 Alice wbtc \n",
+ "0 0 deposit 500000 Alice usdc \n",
+ "0 0 deposit 500000 Alice usdt \n",
+ "0 0 deposit 500000 Alice dai \n",
+ "0 0 deposit 50000 Alice eth \n",
+ "0 0 deposit 50000 Alice link \n",
+ "0 0 deposit 50000 Alice tkn \n",
+ "0 0 deposit 50000 Alice wbtc \n",
+ "0 0 deposit 50000 Alice usdc \n",
+ "0 0 deposit 50000 Alice usdt \n",
+ "0 0 deposit 50000 Alice dai \n",
+ "0 0 deposit 500000 Bob eth \n",
+ "0 0 deposit 500000 Bob link \n",
+ "0 0 deposit 500000 Bob tkn \n",
+ "0 0 deposit 500000 Bob wbtc \n",
+ "0 0 deposit 500000 Bob usdc \n",
+ "0 0 deposit 500000 Bob usdt \n",
+ "0 0 deposit 500000 Bob dai \n",
+ "0 0 deposit 50000 Bob eth \n",
+ "0 0 deposit 50000 Bob link \n",
+ "0 0 deposit 50000 Bob tkn \n",
+ "0 0 deposit 50000 Bob wbtc \n",
+ "0 0 deposit 50000 Bob usdc \n",
+ "0 0 deposit 50000 Bob usdt \n",
+ "0 0 deposit 50000 Bob dai \n",
+ "0 0 enableTrading 0 protocol eth \n",
+ "0 0 enableTrading 0 protocol link \n",
+ "0 0 enableTrading 0 protocol tkn \n",
+ "0 0 enableTrading 0 protocol wbtc \n",
+ "0 0 enableTrading 0 protocol usdc \n",
+ "0 0 enableTrading 0 protocol usdt \n",
+ "0 0 enableTrading 0 protocol dai \n",
+ "0 0 enableTrading 0 protocol eth \n",
+ "0 0 enableTrading 0 protocol link \n",
+ "0 0 enableTrading 0 protocol tkn \n",
+ "0 0 enableTrading 0 protocol wbtc \n",
+ "0 0 enableTrading 0 protocol usdc \n",
+ "0 0 enableTrading 0 protocol usdt \n",
+ "0 0 enableTrading 0 protocol dai \n",
+ "0 0 enableTrading 0 protocol eth \n",
+ "0 0 enableTrading 0 protocol link \n",
+ "0 0 enableTrading 0 protocol tkn \n",
+ "0 0 enableTrading 0 protocol wbtc \n",
+ "0 0 enableTrading 0 protocol usdc \n",
+ "0 0 enableTrading 0 protocol usdt \n",
+ "0 0 enableTrading 0 protocol dai \n",
+ "\n",
+ " master_vault_tkn erc20contracts_bntkn staked_tkn is_trading_enabled \\\n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "0 500000 500000 500000 False \n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "0 50000 50000 50000 False \n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "0 500000 500000 500000 False \n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "0 50000 50000 50000 False \n",
+ "0 500000 500000 500000 False \n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "0 500000 500000 500000 False \n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "0 50000 50000 50000 False \n",
+ "0 550000 550000 550000 False \n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "0 500000 500000 500000 False \n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "0 50000 50000 50000 False \n",
+ "0 550000 550000 550000 True \n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "0 500000 500000 500000 False \n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "0 50000 50000 50000 True \n",
+ "0 550000 550000 550000 True \n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "0 500000 500000 500000 False \n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "0 50000 50000 50000 True \n",
+ "0 550000 550000 550000 True \n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "0 500000 500000 500000 True \n",
+ "0 0 0 0 False \n",
+ "0 0 0 0 False \n",
+ "\n",
+ " bnt_trading_liquidity ... network_fee withdrawal_fee bnt_min_liquidity \\\n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 20000 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 20000 ... 0.2 0.0025 10000 \n",
+ "0 20000 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 20000 ... 0.2 0.0025 10000 \n",
+ "0 20000 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 20000 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "0 0 ... 0.2 0.0025 10000 \n",
+ "\n",
+ " cooldown_time protocol_wallet_bnbnt vortex_bnt erc20contracts_bnbnt \\\n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 0 0 0 \n",
+ "0 604800 20000 0 20000 \n",
+ "0 604800 20000 0 20000 \n",
+ "0 604800 20000 0 20000 \n",
+ "0 604800 20000 0 20000 \n",
+ "0 604800 20000 0 20000 \n",
+ "0 604800 20000 0 20000 \n",
+ "0 604800 20000 0 20000 \n",
+ "0 604800 40000 0 40000 \n",
+ "0 604800 40000 0 40000 \n",
+ "0 604800 40000 0 40000 \n",
+ "0 604800 40000 0 40000 \n",
+ "0 604800 40000 0 40000 \n",
+ "0 604800 40000 0 40000 \n",
+ "0 604800 40000 0 40000 \n",
+ "0 604800 60000 0 60000 \n",
+ "0 604800 60000 0 60000 \n",
+ "0 604800 60000 0 60000 \n",
+ "0 604800 60000 0 60000 \n",
+ "0 604800 60000 0 60000 \n",
+ "0 604800 60000 0 60000 \n",
+ "0 604800 60000 0 60000 \n",
+ "\n",
+ " master_vault_bnt staked_bnt bnbnt_rate \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 0 0 1 \n",
+ "0 20000 20000 1 \n",
+ "0 20000 20000 1 \n",
+ "0 20000 20000 1 \n",
+ "0 20000 20000 1 \n",
+ "0 20000 20000 1 \n",
+ "0 20000 20000 1 \n",
+ "0 20000 20000 1 \n",
+ "0 40000 40000 1 \n",
+ "0 40000 40000 1 \n",
+ "0 40000 40000 1 \n",
+ "0 40000 40000 1 \n",
+ "0 40000 40000 1 \n",
+ "0 40000 40000 1 \n",
+ "0 40000 40000 1 \n",
+ "0 60000 60000 1 \n",
+ "0 60000 60000 1 \n",
+ "0 60000 60000 1 \n",
+ "0 60000 60000 1 \n",
+ "0 60000 60000 1 \n",
+ "0 60000 60000 1 \n",
+ "0 60000 60000 1 \n",
+ "\n",
+ "[49 rows x 31 columns]"
+ ]
+ },
+ "execution_count": 83,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "v3.show_history()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 69,
+ "metadata": {
+ "pycharm": {
+ "name": "#%%\n"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " | \n",
+ " | \n",
+ " bnt | \n",
+ " eth | \n",
+ " link | \n",
+ " tkn | \n",
+ " wbtc | \n",
+ " usdc | \n",
+ " bnbnt | \n",
+ " bneth | \n",
+ " bnlink | \n",
+ " bntkn | \n",
+ " bnwbtc | \n",
+ " bnusdc | \n",
+ " vbnt | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " 1 | \n",
+ " Account | \n",
+ " Alice | \n",
+ " 1000000 | \n",
+ " 949950 | \n",
+ " 1001366.94560669456066945606694560669456066945... | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 899999 | \n",
+ " 0 | \n",
+ " 50000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 100001 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Bob | \n",
+ " 1000000 | \n",
+ " 1000000 | \n",
+ " 900000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1000000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 100000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 2 | \n",
+ " Pool | \n",
+ " a: TKN Staked Balance | \n",
+ " 0 | \n",
+ " 50000 | \n",
+ " 100011.046025104602510460251046025104602510460... | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 100001 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " b: TKN Trading Liquidity | \n",
+ " 0 | \n",
+ " 70.000 | \n",
+ " 1966.38772663877266387726638772663877266387726... | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 20000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " c: BNT Trading Liquidity | \n",
+ " 0 | \n",
+ " 5828.57142857142857142857142857142857142857142... | \n",
+ " 34094.9084534870760844234140212578399683868156... | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 20000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " d: BNT Current Funding | \n",
+ " 0 | \n",
+ " 20114.2857142857142857142857142857142857142857... | \n",
+ " 20000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 20000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " e: Spot Rate | \n",
+ " 0 | \n",
+ " 83.2653061224489795918367346938775510204081632... | \n",
+ " 17.3388533663027403025261279900999157793697048... | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " f: Average Rate | \n",
+ " 0 | \n",
+ " 1.0E+3 | \n",
+ " 6.00000000000000000000000000000000000000000000... | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " g: Average Inverse Rate | \n",
+ " 0 | \n",
+ " 0.0010 | \n",
+ " 0.16666666666666666666666666666666666666666666... | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 1 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " 3 | \n",
+ " Network | \n",
+ " BNT Staked Balance | \n",
+ " 60114.2857142857142857142857142857142857142857... | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Master Vault | \n",
+ " 60000.0000000000000000000000000000000000000000... | \n",
+ " 50050 | \n",
+ " 98633.0543933054393305439330543933054393305439... | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 100001 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Protection Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Protocol Equity | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 60000 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ " Rewards Vault | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ " 0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " bnt \\\n",
+ "1 Account Alice 1000000 \n",
+ " Bob 1000000 \n",
+ "2 Pool a: TKN Staked Balance 0 \n",
+ " b: TKN Trading Liquidity 0 \n",
+ " c: BNT Trading Liquidity 0 \n",
+ " d: BNT Current Funding 0 \n",
+ " e: Spot Rate 0 \n",
+ " f: Average Rate 0 \n",
+ " g: Average Inverse Rate 0 \n",
+ "3 Network BNT Staked Balance 60114.2857142857142857142857142857142857142857... \n",
+ " Master Vault 60000.0000000000000000000000000000000000000000... \n",
+ " Protection Vault 0 \n",
+ " Protocol Equity 0 \n",
+ " Rewards Vault 0 \n",
+ "\n",
+ " eth \\\n",
+ "1 Account Alice 949950 \n",
+ " Bob 1000000 \n",
+ "2 Pool a: TKN Staked Balance 50000 \n",
+ " b: TKN Trading Liquidity 70.000 \n",
+ " c: BNT Trading Liquidity 5828.57142857142857142857142857142857142857142... \n",
+ " d: BNT Current Funding 20114.2857142857142857142857142857142857142857... \n",
+ " e: Spot Rate 83.2653061224489795918367346938775510204081632... \n",
+ " f: Average Rate 1.0E+3 \n",
+ " g: Average Inverse Rate 0.0010 \n",
+ "3 Network BNT Staked Balance 0 \n",
+ " Master Vault 50050 \n",
+ " Protection Vault 0 \n",
+ " Protocol Equity 0 \n",
+ " Rewards Vault 0 \n",
+ "\n",
+ " link \\\n",
+ "1 Account Alice 1001366.94560669456066945606694560669456066945... \n",
+ " Bob 900000 \n",
+ "2 Pool a: TKN Staked Balance 100011.046025104602510460251046025104602510460... \n",
+ " b: TKN Trading Liquidity 1966.38772663877266387726638772663877266387726... \n",
+ " c: BNT Trading Liquidity 34094.9084534870760844234140212578399683868156... \n",
+ " d: BNT Current Funding 20000 \n",
+ " e: Spot Rate 17.3388533663027403025261279900999157793697048... \n",
+ " f: Average Rate 6.00000000000000000000000000000000000000000000... \n",
+ " g: Average Inverse Rate 0.16666666666666666666666666666666666666666666... \n",
+ "3 Network BNT Staked Balance 0 \n",
+ " Master Vault 98633.0543933054393305439330543933054393305439... \n",
+ " Protection Vault 0 \n",
+ " Protocol Equity 0 \n",
+ " Rewards Vault 0 \n",
+ "\n",
+ " tkn wbtc usdc bnbnt bneth bnlink \\\n",
+ "1 Account Alice 0 0 899999 0 50000 0 \n",
+ " Bob 0 0 1000000 0 0 100000 \n",
+ "2 Pool a: TKN Staked Balance 0 0 100001 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 20000 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 20000 0 0 0 \n",
+ " d: BNT Current Funding 0 0 20000 0 0 0 \n",
+ " e: Spot Rate 0 0 1 0 0 0 \n",
+ " f: Average Rate 0 0 1 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 1 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 0 0 \n",
+ " Master Vault 0 0 100001 0 0 0 \n",
+ " Protection Vault 0 0 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 60000 0 0 \n",
+ " Rewards Vault 0 0 0 0 0 0 \n",
+ "\n",
+ " bntkn bnwbtc bnusdc vbnt \n",
+ "1 Account Alice 0 0 100001 0 \n",
+ " Bob 0 0 0 0 \n",
+ "2 Pool a: TKN Staked Balance 0 0 0 0 \n",
+ " b: TKN Trading Liquidity 0 0 0 0 \n",
+ " c: BNT Trading Liquidity 0 0 0 0 \n",
+ " d: BNT Current Funding 0 0 0 0 \n",
+ " e: Spot Rate 0 0 0 0 \n",
+ " f: Average Rate 0 0 0 0 \n",
+ " g: Average Inverse Rate 0 0 0 0 \n",
+ "3 Network BNT Staked Balance 0 0 0 0 \n",
+ " Master Vault 0 0 0 0 \n",
+ " Protection Vault 0 0 0 0 \n",
+ " Protocol Equity 0 0 0 0 \n",
+ " Rewards Vault 0 0 0 0 "
+ ]
+ },
+ "execution_count": 69,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "v3.trade('50', 'eth','link', 'Alice', timestamp=2)\n",
+ "v3.describe()"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3 (ipykernel)",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.8.13"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 1
+}
\ No newline at end of file