// In Blueprints, you describe tokens using existing
// primitives. Here, we use `ERC20` to describe a token that
// is redeemable for 5 USDC.
const usdc = new ERC20(5n, {
address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
decimals: 6n,
});
const oracle = new MultisigOracle({
signers: [Cobie, notsofast, Ansem],
threshold: 2n,
feed: new HashedBytes(new MapBytes({
name: "defi_hacks_in_millions",
since: "2026-05-13",
before: "2027-05-13",
})),
});
// We describe another token, this time using
// `LinearPayoff`. Notice it takes another token as one of
// its parameters. In this case, it's an `ERC20` token, but
// it could be anything!
const position = new LinearPayoff(1n, {
collateral: usdc,
oracle,
maxValue: 2_000n,
});
const price = usdc.copyWithAmount(60n);
createOrders([{
inputs: [usdc],
outputs: [position],
}]);