-
Notifications
You must be signed in to change notification settings - Fork 842
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
645 changed files
with
169,050 additions
and
13,132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CREATE TABLE IF NOT EXISTS lsd ( | ||
timestamp timestamp NOT NULL, | ||
name text NOT NULL, | ||
symbol text NOT NULL, | ||
address text NOT NULL, | ||
type text, | ||
"expectedRate" numeric, | ||
"marketRate" numeric, | ||
"ethPeg" numeric | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS lsd_address_timestamp_idx ON lsd (address, timestamp DESC); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const utils = require('../utils'); | ||
|
||
const ADDRESSES = { | ||
ethereum: { | ||
'1INCH': '0x111111111117dc0aa78b770fa6a738034120c302', | ||
dst1INCH: '0x9a0c8ff858d273f57072d714bca7411d717501d7', | ||
}, | ||
}; | ||
|
||
const main = async () => { | ||
const data = await utils.getData( | ||
'https://data-distributor.1inch.io/resolversMetrics' | ||
); | ||
const result = Object.values(data)[0].map((pool) => { | ||
const apyReward = Number(pool.apyBase); | ||
|
||
return { | ||
pool: `1INCH-${pool.resolver_address}-${pool.chain}`.toLowerCase(), | ||
chain: utils.formatChain(pool.chain), | ||
project: '1inch-network', | ||
symbol: '1INCH', | ||
poolMeta: pool.pool, | ||
tvlUsd: Number(pool.tvlUsd), | ||
apyReward, | ||
url: `https://app.1inch.io/#/1/earn/delegate/${pool.resolver_address}`, | ||
rewardTokens: | ||
apyReward > 0 ? [ADDRESSES[pool.chain.toLowerCase()]['1INCH']] : [], | ||
underlyingTokens: [ | ||
ADDRESSES[pool.chain.toLowerCase()]['1INCH'], | ||
ADDRESSES[pool.chain.toLowerCase()]['dst1INCH'], | ||
], | ||
}; | ||
}); | ||
return result; | ||
}; | ||
|
||
module.exports = { | ||
timetravel: false, | ||
apy: main, | ||
// url: "https://app.1inch.io/#/1/dao/staking", | ||
}; |
Oops, something went wrong.