Staking BNT
Contents
Staking BNT¶
v3.describe(decimals=4)
Trading Liquidity | Vault | Staking | ERC20 Contracts | Vortex | External Protection | Protocol WalletState | |
---|---|---|---|---|---|---|---|
0 | bnt=60022.3847 | bnt=60023.5998 | bnbnt=60000.0000 | bnt=12.2692 | bnt=0.0000 | bnbnt=60000.0000 | |
1 | bnt=19055.2381 eth=21.0000 | eth=102.0000 | eth=101.0000 | bneth=101.0000 | eth=0.0000 | ||
2 | bnt=20940.8835 wbtc=1.1943 | wbtc=100.9443 | wbtc=101.0005 | bnwbtc=101.0000 | wbtc=0.0000 | ||
3 | bnt=20013.9939 link=3336.3314 | link=10003.9981 | link=10003.4242 | bnlink=10001.0000 | link=0.0000 | ||
4 |
v3.create_user('David')
timestep = v3.global_state.tokens['bnt'].timestep
print('timestep', timestep)
v3.stake(tkn_amt=1000, tkn_name='bnt', user_name='David', timestep=timestep)
v3.describe(decimals=4)
timestep 0
Trading Liquidity | Vault | Staking | ERC20 Contracts | Vortex | External Protection | Protocol WalletState | |
---|---|---|---|---|---|---|---|
0 | bnt=60022.3847 | bnt=60023.5998 | bnbnt=60000.0000 | bnt=12.2692 | bnt=0.0000 | bnbnt=59000.0000 | |
1 | bnt=19055.2381 eth=21.0000 | eth=102.0000 | eth=101.0000 | bneth=101.0000 | eth=0.0000 | ||
2 | bnt=20940.8835 wbtc=1.1943 | wbtc=100.9443 | wbtc=101.0005 | bnwbtc=101.0000 | wbtc=0.0000 | ||
3 | bnt=20013.9939 link=3336.3314 | link=10003.9981 | link=10003.4242 | bnlink=10001.0000 | link=0.0000 | ||
4 |
Staking BNT¶
In Bancor 3, assume that BNT liquidity providers are receiving protocol bnBNT tokens in return for destroying BNT. The calculation is essentially identical to the standard pool token method, and its outcome is relatively easy to understand. However, there are some nuances to the process that should be highlighted.
For this section, we can consider the state of the system after the initial bootstrapping and first trading activity described earlier. The system snapshot is as follows:
timestep = v3.global_state.tokens['wbtc'].timestep
print('timestep', timestep)
v3.stake(tkn_amt=1, tkn_name='eth', user_name='Alice', timestep=timestep)
v3.describe(decimals=4)
timestep 0
Trading Liquidity | Vault | Staking | ERC20 Contracts | Vortex | External Protection | Protocol WalletState | |
---|---|---|---|---|---|---|---|
0 | bnt=60022.3847 | bnt=60023.5998 | bnbnt=60000.0000 | bnt=12.2692 | bnt=0.0000 | bnbnt=59000.0000 | |
1 | bnt=19055.2381 eth=21.0000 | eth=103.0000 | eth=102.0000 | bneth=102.0000 | eth=0.0000 | ||
2 | bnt=20940.8835 wbtc=1.1943 | wbtc=100.9443 | wbtc=101.0005 | bnwbtc=101.0000 | wbtc=0.0000 | ||
3 | bnt=20013.9939 link=3336.3314 | link=10003.9981 | link=10003.4242 | bnlink=10001.0000 | link=0.0000 | ||
4 |
v3.describe(rates=True, decimals=4)
index | 0 | |
---|---|---|
0 | bnt | Spot Rate=0.0000, EMA Rate=0.0000 |
1 | eth | Spot Rate=907.3923, EMA Rate=1000.0000 |
2 | wbtc | Spot Rate=17534.2111, EMA Rate=16000.0000 |
3 | link | Spot Rate=5.9988, EMA Rate=6.0000 |
The most important nuance to be aware of is that BNT liquidity providers are supporting the BNT liquidity of the whole protocol, rather than any specific pool. As a result, there is no spot price or moving average. Further, bnBNT pool tokens are not created when a BNT liquidity provider adds their tokens to the protocol; there is no change in the vault balance of BNT, or its staked balance (save for one extreme edge case). The provision of BNT by users is best thought of as a private exchange of BNT directly for protocol-owned bnBNT.
To demonstrate, assume a fourth participant, David, wishes to provide 1,000 BNT liquidity to the protocol. The only calculations the protocol must perform are to value the BNT David is providing. The staking ledger is reporting a total of 6,002.3599 BNT, and the bnBNT pool token supply is 6,000 bnBNT. Therefore, the bnBNT/BNT exchange rate is 0.9996068, and David’s 1,000 BNT is worth 999.60683797 bnBNT. When David confirms this transaction, the protocol simply transfers this amount of bnBNT to him, from its own balance; the BNT that David provided is burned immediately.
Note that the only observable change in the system is that the protocol owns less of the total BNT; outside of the system, the ERC20 contract supply of BNT will have diminished slightly. David also receives vBNT, the Bancor governance token, at a 1:1 rate with respect to the bnBNT pool tokens (see the following section). vBNT is staked in the governance contract to take part in Bancor’s decision making process; however, it must also be returned when a user exits from the protocol.