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

feat: add otsea protocol #10633

Merged
merged 4 commits into from
Jun 18, 2024
Merged

feat: add otsea protocol #10633

merged 4 commits into from
Jun 18, 2024

Conversation

seiji0411
Copy link
Contributor

@seiji0411 seiji0411 commented Jun 13, 2024

NOTE

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


  • If you would like to add a volume adapter please submit the PR here.
  • If you would like to add a liquidations adapter, please refer to this readme document for details.
  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):

OTSea

Twitter Link:

https://x.com/otseaerc20

List of audit links if any:

https://dedaub.com/audits/otsea/otsea-dec-18-2023/
https://raw.githubusercontent.com/peckshield/publications/master/audit_reports/PeckShield-Audit-Report-OTSea-v1.0.pdf

Website Link:

https://otsea.io/

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

otsea-logo

Current TVL:
ethereum                  142.08 k
base                      99.46 k
blast                     541
Treasury Addresses (if the protocol has treasury)
Chain:

Ethereum, Base, Blast

Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed): (https://api.coingecko.com/api/v3/coins/list)

otsea

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)

28349

Short Description (to be shown on DefiLlama):

OTSea is a leading OTC trading platform on web3 that provides users with a reliable and user friendly solution for trading crypto assets peer-to-peer.

Token address and ticker if any:

N/A

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

Dexes

Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.):
Implementation Details: Briefly describe how the oracle is integrated into your project:
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):

Not a fork

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

We are calculating tvl by fetching the locked assets with otsea graphql endpoints.

@llamatester
Copy link

The adapter at projects/otsea exports TVL:

ethereum-staking          1.19 M
staking                   1.19 M
ethereum                  142.05 k
base                      99.44 k
blast                     540

total                    242.03 k 

@seiji0411 seiji0411 changed the title add otsea project (tvl, staking, offers) feat: add otsea protocol Jun 13, 2024
@llamatester
Copy link

The adapter at projects/otsea exports TVL:

ethereum-staking          1.16 M
staking                   1.16 M
ethereum                  90.38 k
base                      295
blast                     10

total                    90.69 k 

return async (api) => {
// locked in sell orders (ETH amount on sell orders)
let graphQLClient = new GraphQLClient(endpoint);
let query = gql`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the ETH in the sell orders held?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have buy/sell orders on markets.
Buy orders means the request of buying the target token with ETH, so users lock ETH. we calculate locked ETH for buy orders by fetching the ETH balance of our market contract.
Sell orders means the request of selling the token. so users lock the target token and suggest the required ETH amount. We calculate the sum of required ETH amount for sell orders by using our graphql endpoints.

Totally, locked assets = locked ETH (buy orders) + required ETH (sell orders)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to count the token opposed to the required ETH? If not, could you add a 'misrepresentedTokens: true' property to your adapter exports?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added 'misrepresentedTokens: true' property to exports

@waynebruce0x waynebruce0x self-assigned this Jun 14, 2024
@llamatester
Copy link

The adapter at projects/otsea exports TVL:

ethereum-staking          1.16 M
staking                   1.16 M
ethereum                  95.51 k
base                      308
blast                     10

total                    95.83 k 

@waynebruce0x waynebruce0x merged commit 7542bcf into DefiLlama:main Jun 18, 2024
1 check passed
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