
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
@uma/financial-templates-lib
Advanced tools
Arbitrage automation and libraries for UMA financial templates
This package contains various clients and helpers to interact with UMA's financial templates. It is primarily used to power the disputer, liquidator, and monitor bots.
yarn add @uma/financial-templates-lib
const { FinancialContractClient, GasEstimator } = require("@uma/financial-templates-lib")
The three clients available are:
The FinancialContractClient can be used to access information about Financial Contract sponsors and their collateralization
ratios. To understand how to interact with the client, see the class documentation
here.
The FinancialContractEventClient can be used to access historical events that were emitted by a Financial Contract. To
understand how to interact with the client, see the class documentation
here.
The TokenBalanceClient tracks the collateral and synthetic balances for a list of wallets. To understand how to
interact with the client, see the class documentation
here.
The package offers a variety of price feed implementations that adere to the PriceFeedInterface (docs can be found in
the interface file here):
CryptoWatchPriceFeed, found here, uses https://cryptowat.ch/ as a
source of CEX price data.UniswapPriceFeed, found here, uses a Uniswap (v2) market TWAP as the
price source. Note: the TWAP length can be set to 0 to make this an instantaneous price.BalancerPriceFeed, found here, uses a Balancer market as the price
source.MedianizerPriceFeed, found here, takes multiple price feeds and
returns the median of their prices.There are a few other helper/utility files that are relevant:
CreatePriceFeed.js to create price feeds with
no or incomplete input configurations.The Logger directory contains helpers and factories for logging with Winston. To get the default logger:
const { Logger, createPriceFeed, Networker } = require("@uma/financial-templates-lib");
// A winston logger is required for createPriceFeed, networker and other objects in financial-templates-lib.
const networker = new Networker(Logger);
const priceFeed = createPriceFeed(Logger, web3, networker, ...);
// You can also log directly using the winston logger.
Logger.debug({
at: "createPriceFeed",
message: "Creating CryptoWatchPriceFeed",
otherParam: 5
});
There are two helper files that are available in financial-templates-lib:
GasEstimator provides an estimate of the current fast gas price.FAQs
Arbitrage automation and libraries for UMA financial templates
The npm package @uma/financial-templates-lib receives a total of 405 weekly downloads. As such, @uma/financial-templates-lib popularity was classified as not popular.
We found that @uma/financial-templates-lib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated “elf-*” npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Security News
TypeScript 6.0 will be the last JavaScript-based major release, as the project shifts to the TypeScript 7 native toolchain with major build speedups.