ethprotocol

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 16 Imported by: 0

README

Protocols

graph LR
commonapys[apy info struct]
commonapys-->commonapy[apy]
commonapys-->commonapr[apr]
commonapys-->commonincy[incentive apy]
commonapys-->commonincr[incentive apr]

commonerc20s[erc20 info struct]
commonerc20s-->commonerc20address[address]
commonerc20s-->commonerc20symbol[symbol]
commonerc20s-->commonerc20decimals[decimals]

pro[protocol]

pro-->probasic[protocol basic info]
pro-->bps[lend pools]
pro-->lps[liquidity pools]
pro-->sps[stake pools]

probasic-->network
probasic-->proname[protocol name]
probasic-->client[eth client]
probasic-->geckokey[coingecko caller]

bps--aave-like-->avstoken[a,v,stoken]
bps--compound-like-->ctoken
bps-->bpstype[lend pool type]

bpstype-->aave-like
bpstype-->compound-like

avstoken-->erc20lendaave[basic erc20 info]-->erc201[erc20 info struct]
avstoken-->underlyinglendaave[underlying erc20 info]-->erc202[erc20 info struct]
avstoken-->apyslendaave[apy info]

apyslendaave-->apylendaave[apy info struct]

ctoken-->erc20lendcomp[basic erc20 info]-->erc203[erc20 info struct]
ctoken-->underlyinglendcomp[underlying erc20 info]-->erc204[erc20 info struct]
ctoken-->apyslendcompdepo[deposit apy info]-->apys1[apy info struct]
ctoken-->apyslendcomplend[borrow apy info]-->apys2[apy info struct]




Targets

  • Pool

    • tokens

    • lp

    • apys(apr)

    • volume (day)

    • tvl

    • otherinfo(platypus)

    • userinfo

      • deposited

      • ?

  • Lend

    • atoken

      • basic

      • underlying

    • vtoken

      • basic

      • underlying

    • stoken

      • basic

      • underlying

    • ctoken

      • basic

      • underlying

    • deposit apys(apr)

    • borrow apys(apr)

    • collateral factor

    • liquidation limit

    • allow borrow

    • allow collateral

    • liquidation penalty

  • Stake

    • tokens

    • stake contract

    • volume

    • tvl

    • apys(apr)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Protocol

type Protocol struct {
	ProtocolBasic  *model.ProtocolBasic
	LiquidityPools []*liquidity.LiquidityPool
	StakePools     []*stake.StakePool
	LendPools      []*lend.LendPool
}

func New

func New(network string, protocolName string, client bind.ContractBackend, coingeckoApiKey string) (*Protocol, error)

func (*Protocol) ProtocolToken

func (p *Protocol) ProtocolToken() (string, error)

Return protocol token.

func (*Protocol) UpdateLendApys

func (prot *Protocol) UpdateLendApys() error

Directories

Path Synopsis
internal
apy

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL