DeFi Pooling overview
Decentralized finance (DeFi) holds the promise of democratizing financial services so that anyone with a smartphone can take part. However, to truly live up to its potential and accommodate smaller investors, fees must drop.
While it is difficult to reduce the fees involved in processing a smart contract on an Ethereum blockchain, sharing those fees with others is a relatively trivial process. Fee sharing is well established within onchain liquidity pools. However, joining, leaving, and re-balancing a liquidity pool is still expensive, often prohibitively so.
Layer 2 (L2) transaction pooling enables sharing transaction costs across a larger group. By batching transaction requests, the pool of users can be significantly larger. This solution is known as DeFi Pooling. DeFi Pooling offers a new way to split the L1 bill and makes position re-balancing available on L2.
Terminology for DeFi Pooling on StarkEx
admin |
An entity that registers new rides and activates the operation required for the different phases of the DeFi Pooling flow. |
ride |
A specific onchain strategy. A ride consists of the following parameters:
|
investment token |
The type of token that a user invests in a DeFi strategy, that is, the token used to pay into the liquidity pool. |
ride ticket |
A temporary intermediate token that the user buys with their investment tokens in order to join a DeFi Pooling ride. These tokens mediate between the investment tokens and the strategy tokens to coordinate multiple users to invest together in the same strategy. |
strategy token |
A token type that the user receives once invested in a DeFi strategy. This token represents the ownership of funds in the strategy. These funds are redeemable at any point in time using the onchain strategy smart contract. |
passengers |
Offchain users that have joined a ride, that is, they have signed the required transactions to participate in the ride. |
System components
The StarkEx DeFi Pooling system consists of the following components:
offchain and onchain components |
These include the StarkEx services, the StarkEx smart contract, and a STARK verifier smart contract. StarkEx does the following:
|
DeFi Pooling operator |
This component receives requests from users to join a specific ride. It manages the users' signed transactions and also matches and settles trades between users and the onchain Pool Manager smart contract. |
Pool manager |
A smart contract, onchain component. It executes the onchain strategy for the pool of funds collected from the ride passengers. This contract coordinates between the DeFi contract in order to execute the strategy, and the StarkEx contract, in order to exchange funds with the ride passengers. |
Flow phases
A DeFi Pooling flow proceeds in four phases:
-
Register a new ride
A new ride is configured to execute a specific strategy at a specific price.
-
User onboarding
Multiple users join a ride by buying ride tickets.
-
Ride execution
The onchain Pool Manager smart contract withdraws the passengers' funds and trades them for strategy tokens. The trade succeeds only if the trading price is lower or equal to the price defined at step 1.
-
User offboarding
Passengers trade their ride ticket for strategy tokens.