Upload BlueChip contract to Osmosis

BlueChip decentralizes creator and content subscriptions. Creators are able to launch a CW20 token that gets paired with OSMO in their own liquidity pool. The liqudity pool itself has two distinct phases.

Phase 1, Funding Phase: The creator creates their token and their pool is deployed. No tokens are minted yet, and the pool itslef is given full minting abilities over the token. At first, the pool is only able to accept a specefic type of transaction, the commit. The commit can only be carried out by using OSMO. When committing to the creator pool, the committer DOES NOT make a swap. They are committing to the pools ledger. The ledger tracks the amount of OSMO committed to it priced in dollars. Once the contract obtain $25,000 in OSMOS, the pool begins to transition to phase 2.

Crossing the $25,000 Threshold: Once the threshold is crossed, the pool officially mints the creators token, and uses the initial $25,000 of OSMO to seed the pools liquidity. The pool sends the minted creator tokens to 4 sepearte locations: the pool itself (350,000 tokens used as liquidity), to each committer in relation to how much they commited (500,000 total tokens), to BlueChip protocol wallet (25,000), and then finally an amount back to the creator themselves (325,000).

Phase 3, Pool is no longer dormant: After the threshold is crossed, the pool behaves as normal and wallets are able to freely commit, swap, provide liquidity etc with the pool. When committing to the pool now, the committer will recieve creator tokens in return for their commit just like any other swap.

A final note, the commit transaction sends a 5% and 1% fee to the creator and BlueChip protocol wallets respectively. The commit transaction emits different messages than a normal swap allowing creators and others to seemlessly sync it to their front ends.

Github: GitHub - Bluechip23/bluechip-osmosis-contract · GitHub

Testnet evidence:
The protocol is deployed and has been exercised end-to-end on Osmosis
testnet. The stored code’s on-chain hashes match the reproducible
cosmwasm/optimizer 0.16.0 artifacts in the repo (byte-for-byte).

Deployed contracts

  • Factory: `osmo1xchfk3t6xzl7t5jyr408p3waxxwftyl7kp7muw2w4rujt3h49h3qq0s54s`
  • Router: `osmo1cyry2qx80dzsttudgqf76vlkp7p6822ujc3kcfge4pzdu3dq6srs9cpa6d`
  • Example commit pool (factory-instantiated): `osmo15uxs9xun2zrrdr2s7sq4vlmapuhqfxttpuusz66783c67kktc3cqaxw7cs`
    • Creator token (CW20): `osmo1zulz5faktmtpgfvu3yfvz3v9uksqurmvqavdxa93j6mctzr8pe6q8slnkc`
    • LP position NFT (CW721): `osmo14f89kkfen9zmkdnq4ykras88mqjczezp22uf38g534pycrq4sqwqk7cr6s`

Full lifecycle, on-chain (tx hashes)

  1. Create commit pool (factory spawns the pool) — `E738927A1BD35B3287E0DA738746C16CF4AD19DCADEA5C3B445BE4391B651656`
  2. Pre-threshold commit — `D22FA4ED9E20DA0328E1C17C37C995488B95FF62052E6CE49DB28FB63780C34A`
  3. Cross USD threshold → AMM self-seeds — `DAFA628AFFF5B6E77D47087903BED3964F2C8DD397C44358B01E303DA914BA51`
  4. Pro-rata committer distribution (CW20 payout) — `5F0FE86C741C2802C124BD4976EE17C762C5EBA62FB676E0B1CCDCF10D57659E`
  5. Swap OSMO → creator token — `2BA2594A169346914FC6013E4E769F20A78F45F74CD88B4B2612D54EF9AF7096`
  6. Swap creator token → OSMO — `7E063677DF4F5B09563D5DC266B0914D094D9CC327CD1BFCDABBAF0502AC20A5`
  7. Add liquidity (mints position NFT) — `F7A2B85D40E543B79740A18C1C70DAE8BCFE59436D30063582E84E90CA47F71F`
  8. Remove liquidity — `03E1F8D094D05BA253C41BD0FA897ACBA69A98CD95118DFFA1833CE045CBC580`
  9. Router single-hop swap — `32BCF044979AD9F08294C3C34B4CDA9FD4BF4A55E3C4344608D3A62ECC3FDB7B`

This looks like something that is half way between Start Cooking and Streamswap in that it is a liquidity launch mechanism that doesn’t use a bonding curve like Start.cooking does, more similar to running a Streamswap but then automatically pooling the results.

However, there are multiple issues that I can see with Osmosis compatability:

  • The pool that is spawned looks like a stand alone AMM rather than linking into the poolmanager module. This won’t be compatible with Osmosis routing or fee collection. It is effectively deploying a stand alone DEX on top of Osmosis which shouldn’t happen. There is the cosmwasmpool process for linking another DEX to the main Osmosis poolmanager, but it is probably simpler to do the same thing as start cooking and use standard pool creation tooling.

  • Mints CW20 tokens instead of TokenFactory which are not typically used on Osmosis for the last few years since they require separate IBC channels to be maintained.

  • The distribution percentages seem arbitrary? What if a creator wanted a smaller share of the tokens, or more liquidity compared to the distribution?

  • I also don’t think the maths works here in terms of incentivising a stable launch. You’re proposing that the launch always happens at $25k with 350k tokens in the pool. That makes tokens always launch at around 7 cents. Assume that 10 people commit 2.66k each (25k after fees), they get 50k tokens each, which the first to sell can redeem for around $3.1k. So you’re incentivizing a race to dump, and that’s not taking in to account the 25k that BlueChip holds that there is no incentive to hold at all and the 325k that the creator could also dump to extract around 12k of the 25k raise with no initial risk from themselves.

1 Like

I appreciate the feedback!

For your first two points, I will look into how to dissect this and just use Osmosis pools and token protocol. That actually makes a lot of things easier on my end. This contract was initially made for a standalone Cosmos SDK chain. I overlooked that part of the deconstruction. At initial glance, I should be able to make everything the same with the same functionality, just different pre-built tools. Much less headache and even more robust security measures.

The distribution is not arbitrary. After the threshold is crossed, the creator pool is a liquidity pool with no restrictions. If the creator wants more liquidity to be put in the pool, they are welcome to deposit more liquidity into the pool. If they want less tokens, they can swap them.

Yes, dumping is certainly a potential issue. To address each actor and why they wouldn’t:

  1. Bluechip is building the protocol. Destroying a reputation for a quick buck is pretty stupid. Even if the goal was purely extraction, dumping all the tokens would be a terrible way to do it. Either way, building trust, and a long term product, makes much more money. Moreover 25,000/1.2mil = 2%. That isn’t nothing, but it also has a limited impact on the price.

  2. The creator is in a similar boat as Bluechip. Far more money is to be made from building a community than dumping on them. If they truly decide to do this, no one will trust them moving forward.

  3. The initial subscribers have the most incentive to dump in my opinion. But again, they probably have more to gain from holding if they got in on a creator/pool early enough to be a part of the commit ledger. There is a balance between funding the contract and making a profit. For instance if a person funded the whole contract, they would obviously lose money. If they funded the contract partially and were able to make a profit from their deposits, and decided to dump, that means there were many other committees so their dump is limited in price movement. If they dumped right away like you are insisting, the total damage is capped at 25000 spread across all committers. I’m not saying it is nothing but it is nonetheless limited.

  4. The final point that wraps many of these points together is the use case of the pool. The pool itself has a unique transaction called the commit. The commit emits unique messages to the front end allowing for things such as decentralized subscriptions. This gives the token a real use case. On commit, the pool makes a swap and sends creator tokens back to the committer, moreover, the creator token holder can use the creator token to deposit liquidity to obtain future fees from commits and normal swaps etc.

I will revisit the code base and look at different ways to implement Osmosis native tokenfactory and pool creation and most likely resubmit. As it stands, it does not sound like the pools would even be discoverable if I dont change anything.

1 Like