Learning Rubicon Pools: What is a bathToken?
Everything you need to know about bathTokens 🛁
This is the first edition of a new series on our blog called Learning Rubicon Pools!
Rubicon Pools are the native liquidity solution for the Rubicon decentralized exchange. Liquidity providers (LPs) deposit tokens into single asset pools, where the pool liquidity is used by active managers (we call them strategists) to make markets on the Rubicon order books. The liquidity providers and the strategists share the profits from the market-making activities!
bathTokens = LP tokens for Rubicon Pools
In a similar fashion to many DeFi protocols, when a user deposits tokens into one of the Rubicon Pools, they receive LP tokens in return. LP tokens are fungible ERC20 tokens that represent the holder’s share of the pools’ underlying balance of tokens. We use the prefix “bath” to denominate Rubicon Pools LP tokens. For example, if you deposit USDC into Rubicon Pools, you will receive bathUSDC tokens in return. Note that bathTokens are transferable, but whoever holds them can redeem them for the underlying balance.
Again, these bathTokens represent your share of ownership in the underlying single asset pool. Importantly, they are not 1:1 with the ERC20 token you deposit into the pool. (100 USDC ≠ 100 bathUSDC)
For developers who want to look at the code, you can check out the BathToken.sol contract here. Careful readers might notice that we adapted logic from yearn.finance to keep track of the underlying pool balances. For more information on this in their words, check out this page from their docs.
Depositing and Withdrawing
Below you can see the ETH Pool menu from the Pools page of our app.
In the image on the left, the user is depositing 1 ETH into the ETH Pool. For their 1 ETH deposit, they received 0.8871 bathETH. At any time, they can redeem this bathETH balance for their share of the ETH pool by withdrawing.
On the right image, you can see the user about to withdraw from the ETH Pool; they are using the Max button to redeem their entire bathETH balance and completely withdraw their share of ETH from the pool.
Rubicon Pools is not a lending protocol, it is an active liquidity provisioning protocol! This means that Pools growth rates are variable and not continuous. We do our best to reflect pool returns on our app, and we will continue adding functionality to track your LP positions.
Review
Let’s recap what we learned. BathTokens are liquidity provider tokens for Rubicon Pools. To maximize capital efficiency and utilization rates, Rubicon’s liquidity system uses single asset pools; there is only one ETH pool, one USDC pool, one DAI pool, etc.
A liquidity provider depositing ETH into Rubicon Pools receives bathETH, a fungible and transferable ERC20 token that represents their share of ETH in the ETH pool. The underlying balance of ETH in the pool will increase when strategists execute profitable market-making strategies and decrease if their strategies become unprofitable.
Still have questions about bathTokens? Join our Discord community and ask our team in the #support channel!
Risks
Remember, providing liquidity to Rubicon Pools comes with certain risks. Liquidity in the pools is actively used to make markets on the Rubicon order books, due to unforeseen market conditions this could become unprofitable and pool LPs could experience negative returns. We encourage you to understand the risks and read the Rubicon contracts yourself before interacting with Rubicon Pools.
Join the Rubicon Community!
To keep up with Rubicon updates, follow us on Twitter and join our Discord and Telegram communities where you can keep up with our team day-to-day.
If you want to learn more about Rubicon, start by visiting our Docs and check out our blog.
And if you are inclined to check out the Rubicon protocol yourself, you can review all of our contracts on our Github. You can also reach us at contact@rubicon.finance
Alea iacta est.