Each capital pool of OneSwap is a smart contract that holds balances of two unique tokens and enforces rules around depositing and withdrawing them.
This rule is the constant product formula. When a token is deposited (sold), a proportional amount must be withdrawn to maintain the constant. Contrariwise, if a token is withdrawn (purchased), a certain proportion of the amount must be deposited.
When the capital pool is created, the token balance is 0, and the user who deposits first will determine the initial price of the pool. The earlier the user join the pool, the greater the weight. According to the weight, users can obtain proportional share of transaction fees.
Comments
0 comments
Article is closed for comments.