open-dollar / od-bot Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://od-sdk.vercel.app
License: MIT License
Home Page: https://od-sdk.vercel.app
License: MIT License
add global analytics data
Lines 36 to 37 in 6eeaa7b
https://github.com/reflexer-labs/auction-keeper
what: liquidates underwater safes, bids on surplus
how: collateral auction house interactions
result: user collateral in safes is bought via bids and sold to the market for profit.
why: keeping the protocol free of bad debt and settling surplus tokens
https://www.figma.com/file/cipzwfeTSmY1T4pB6ppt5M/GEB-Diagram---NFT-Strategy?type=whiteboard&node-id=0-1&t=TK8jUtnhmNjr2ytD-0
https://docs.reflexer.finance/
regular geb with no changes:
https://www.figma.com/file/5GL7lVwqNeNKIcANCgCJjl/GEB-Diagram-Share?type=whiteboard&t=OjxAndc4U2uYbHVq-0
claiming for v1.5.9 deployment receives 1e-16 ARB
Fetching balances for each user is taking too long, since 3 contracts must be fetched for each user. Some options:
Create new endpoint for screening
Need two different ones to ensure cron jobs run against dev branch And main branch
in the /claim function
/vaults
Return a JSON response using the example vaults.js query https://github.com/open-dollar/od-subgraph/blob/main/queries/vaults.js
/user?address=<address>
Return the response from the example user.js query
- erc20Supply
- marketPrice
- globalDebt
- globalDebtUtilization (show percentage)
- surplusInTreasury
- redemptionRate and redemptionPrice should be shown on the same graph
Notes:
yarn test
a few timesCall settleAuction
on collateral auction house contract
use https://www.letsgethai.com/#/auctions?type=COLLATERAL HAI app code for which functions to call and how to use the SDK to make this directly since it is used in their app
/lp?token=od
Sum of the ERC20 balance of OD for all pools:
/lp?token=odg
Sum of the ERC20 balance of ODG for all pools:
updateCollateralPrice is costing us $0.35 https://optimistic.etherscan.io/tx/0xc119ecc015d6f28a4e85b081bb0ea308b3f927bfc0bf4742171ab356f2187be1 with the bot
however when people are calling it using the job contract, which actually performs three actions in one single step, they are only paying $0.06 total https://optimistic.etherscan.io/tx/0x4caa233fe6701e80e1f4777a1ec46987ed4e1d740fb33e637a3e9475a380487a
/totalsupply?token=od
/totalsupply?token=odg
Return the ERC20 contract total supply, as a numerical value eg. 123.0123
Use this example API: http://chainz.cryptoid.info/grs/api.dws?q=totalcoins
/circulating?token=od
/circulating?token=odg
Return the ERC20 contract total supply - X
as a numerical value eg. 123.0123
For OD, X is 0
For ODG, X is (see Discord)
For each collateral type, get analytics data and return in discord message
Due to the block timing issue on goerli arbitrum, we need to add a delay when sending back-to-back updateCollateralPrice to prevent those from failing
Vercel deprecates node 16 deployments in February. Update to be compatible with node 18
➤ YN0000: │ /tmp/xfs-03592262 STDERR error [email protected]: The engine "node" is incompatible with this module. Expected version "^12.0.0 || ^14.0.0 || ^16.0.0". Got "18.17.1"
Verify that "claim" airdrop is only enabled on testnet
Leftover from #35 /accounting, this requires additional arguments
use https://www.npmjs.com/package/@apollo/server to create a graphql endpoint
Later, we will use https://github.com/hasura/graphql2chartjs to conver prisma data to chartjs
Still needs more discussion
https://lyonwj.com/blog/graph-visualization-with-graphql-react-force-graph
closed by #92
Issue due to extra postQuery, invoking initGeb from within the postQuery
Add a 2 minute cooldown to all operations which submit transactions
This will prevent Nonce errors from causing the operation to fail
Related to #68
The payer wallet is not able to send gas to the bot wallet. This is likely due to the gas settings for optimism. We need to address this, and also update the gas settings for Arbitrum so we don't have the same issue there.
A user can call updateResult on the Rate Setter contract to re-calculate the redemption price. This should be called at least once an hour. This also updates the result of the current market price (as the protocol understands it) based on the pool that is being tracked, initially OD/ETH. When the market rate is above/below target, then the redemption rate is set as a reflex
Should output data related to what the redemption price over time.
arbitrum
To enable easier saving
liquidateSafe
on the liquidation engineA declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.