Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: mito tvl #9294

Merged
merged 2 commits into from
Mar 12, 2024
Merged

chore: mito tvl #9294

merged 2 commits into from
Mar 12, 2024

Conversation

shane-moore
Copy link
Contributor

@shane-moore shane-moore commented Mar 12, 2024

NOTE

Please enable "Allow edits by maintainers" while putting up the PR.

  1. Once your adapter has been merged, it takes time to show on the UI. If more than 24 hours have passed, please let us know in Discord.
  2. Sorry, We no longer accept fetch adapter for new projects, we prefer the tvl to computed from blockchain data, if you have trouble with creating a the adapter, please hop onto our discord, we are happy to assist you.
  3. Please fill the form below only if the PR is for listing a new protocol else it can be ignored/replaced with reason/details about the PR
  4. For updating listing info It is a different repo, you can find your listing in this file: https://github.com/DefiLlama/defillama-server/blob/master/defi/src/protocols/data2.ts, you can edit it there and put up a PR
  5. Do not edit/push package-lock.json file as part of your changes, we use lockfileVersion 2, and most use v1 and using that messes up our CI
  6. No need to go to our discord and announce that you've created a PR, we monitor all PRs and will review it asap

Name (to be shown on DefiLlama):

Mito

Twitter Link:

https://twitter.com/MitoFinance

List of audit links if any:

https://github.com/SCV-Security/PublicReports/blob/9fb984896b44bc8518f77a4aa94cdb9186b94743/Mito%20Finance/Mito%20Finance%20-%20Mito%20Contracts%20-%20Audit%20Report%20v1.0.pdf

Website Link:

https://mito.fi/

Logo (High resolution, will be shown with rounded borders):

mito

Current TVL:

$2350000 USD (at minimum, since missing some token metadata for some of denoms in vaults, can check npm run tvl to see missing denoms atm)

Treasury Addresses (if the protocol has treasury)

N/A

Chain:

Injective

Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed): (https://api.coingecko.com/api/v3/coins/list)
Coinmarketcap ID (so your TVL can appear on Coinmarketcap, leave empty if not listed): (https://api.coinmarketcap.com/data-api/v3/map/all?listing_status=active,inactive,untracked&start=1&limit=10000)
Short Description (to be shown on DefiLlama):

Mito is a groundbreaking Web3 protocol that revolutionizes
automated trading, launchpads, RWAs and real yield generation.

Token address and ticker if any:

N/A

Category (full list at https://defillama.com/categories) *Please choose only one:

Yield, however the app is also a launchpad, do I make another PR for Mito Launchpad? would tvl for the mito launchpad be sum of all new tokens minted by the launchpad and given to subscribers?

Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.): Pyth
Implementation Details: Briefly describe how the oracle is integrated into your project: price feeds for perp vaults
Documentation/Proof: Provide links to documentation or any other resources that verify the oracle's usage:

N/A

forkedFrom (Does your project originate from another project):

N/A

methodology (what is being counted as tvl, how is tvl being calculated):

Flow:

  1. User subscribes to a vault in hopes to attain yield. By subscribing, they send funds to a master vault smart contract. Each vault is a subaccount of the main master vault.
  2. The main vault smart contract immediately moves the user's funds to the chain's exchange module where the funds will sit in a subaccount, specific to the vault
  3. This PR is only counting TVL from the vault's availableBalance in the subaccount, which is the funds that stay locked up in the subaccount and are NOT in use as limit orders posted by the vault to the onchain orderbook. This ensures no double counting of TVL between the Injective apps Helix and Mito, since Helix is taking credit for TVL of limit orders on the onchain orderbook.
Github org/user (Optional, if your code is open source, we can track activity):

N/A

@llamatester
Copy link

The adapter at projects/mito exports TVL:

injective                 2.78 M

total                    2.78 M 

@g1nt0ki g1nt0ki merged commit 327e2fa into DefiLlama:main Mar 12, 2024
1 check passed
@g1nt0ki
Copy link
Member

g1nt0ki commented Mar 12, 2024

@shane-moore thanks for the PR

@llamatester
Copy link

The adapter at projects/mito exports TVL:

injective                 4.53 M

total                    4.53 M 

@shane-moore
Copy link
Contributor Author

@g1nt0ki, thanks for approving PR! I'm also curious about how tvl could work for for the launchpad portion of mito

Launchpad flow:

  1. Users lock up INJ in a SC in order to subscribe to receive tokens from the launchpad. The INJ stays locked up for the duration of the launchpad.
  2. Then, users receive their tokens after the countdown is complete
  3. The INJ from the launchpad then goes partially to the token creators and partially to the new vault that gets created

Questions:

  1. I'm guessing that would be a new adapter?
  2. I'm curious if we can take tvl credit for the INJ that's locked up in the SC during the launchpad?
  3. Also, what happens to the TVL during step 3?

Thanks!

@g1nt0ki
Copy link
Member

g1nt0ki commented Mar 13, 2024

@shane-moore yeah, ideally sublisting/new adapter for the launchpad
yup, as long as the INJ is in a SC deployed by your team, it is your tvl.
What happens in the new vault? like new vesting vault per launchpad project?

@shane-moore
Copy link
Contributor Author

@g1nt0ki, gotcha, so something like a mito launchpad adapter, and we can count the locked up INJ for duration of launchpad

some INJ will also go back to the users if the vault is over-subscribed. forgot to mention that above

What happens in the new vault? like new vesting vault per launchpad project?
yes, new vesting vault per launchpad project.

-> The vault that gets created will:

  1. Get some of the INJ from the launchpad
  2. Users can LP to the vault using their new token + a proportional amount of INJ (x*y=k is current MM strategy for the vaults, but more strategies will come later)
  3. user gets back LP tokens representing their double sided funds in the vault, which they can then stake for rewards

jc how to handle TVL after launchpad is complete and the INJ goes to token creator + vault + some refund to users if oversubscribed

@shane-moore
Copy link
Contributor Author

@g1nt0ki, bumping this, incase fell off your radar 🙏

@g1nt0ki
Copy link
Member

g1nt0ki commented Mar 19, 2024

hi @shane-moore, so we can count the INJ in the launchpad, INJ and LPs in the vault as tvl. But not the INJ refunded to users as tvl since it is no longer in a contract cotrolled by you

YeeeeeHan pushed a commit to parasail-network/DefiLlama-Adapters that referenced this pull request Apr 24, 2024
* chore: mito tvl

* code refactor

---------

Co-authored-by: g1nt0ki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants