import * as Eulith from "./index"; /** * Open or close a levered short position * * What is a levered short? * * It's a partially collateralized short. Normally, if you take a loan from Aave you have to OVER collateralize the loan. * * For example, let's say you want to short $10 worth of ETH. * A fully collateralized position would require $10 to short $10 worth of ETH. * With a levered short, you can short $10 worth of ETH for more like $2. * * NOTE: This is all FULLY noncustodial (Eulith doesn't manage any of the money) and FULLY on-chain * (money only comes from protocols, no centralized dark pool money). * * Shorts take place in an atomic tx (see Eulith.AtomicTx), and don't take effect until that transaction * is committed, signed, and sent to the network. */ export declare class Shorts { constructor({ atomicTx }: { atomicTx: Eulith.AtomicTx.Transaction; }); /** * Create a new short position. This method adds the short transaction to the pending atomic transaction automatically. * * When you're ready to execute, you just need to commit, sign and send the pending atomic transaction. */ shortOn({ collateralToken, shortToken, collateralAmount }: { collateralToken: Eulith.Contracts.ERC20TokenContract; shortToken: Eulith.Contracts.ERC20TokenContract; collateralAmount: number; }): Promise; /** * Unwinds an existing short position. This method adds the short off transaction to the pending atomic transaction automatically. * * When you're ready to execute, you just need to commit, sign and send the pending atomic transaction. */ shortOff({ collateralToken, shortToken, repayShortAmount, trueForUnwindA }: { collateralToken: Eulith.Contracts.ERC20TokenContract; shortToken: Eulith.Contracts.ERC20TokenContract; repayShortAmount: number; trueForUnwindA?: boolean; }): Promise; /** * Gets the underlying provider managing this transaction */ get provider(): Eulith.Provider; private readonly provider_; }