Static oracle
oracle: { deposit: (deltaA: bigint, deltaB: bigint, reserveA: bigint, reserveB: bigint, liquidity: bigint) => { deltaA: bigint; deltaB: bigint; lpt: bigint; newLiquidity: bigint; newReserveA: bigint; newReserveB: bigint }; extract: (a: bigint, b: bigint, reserveA: bigint, reserveB: bigint) => bigint[]; fee: (askAmount: bigint, feeRatio: bigint, taxRatio: bigint) => { askAmount: bigint; fee: bigint; tax: bigint }; inverseSwap: (askAmount: bigint, reserveBid: bigint, reserveAsk: bigint, feeRatio: bigint, taxRatio: bigint) => bigint; rake: (amount: bigint, bidReserve: bigint, askReserve: bigint, feeRatio: bigint, taxRatio: bigint) => bigint; sided_deposit: (deltaA: bigint, deltaB: bigint, reserveA: bigint, reserveB: bigint, liquidity: bigint, feeRatio: bigint, taxRatio: bigint) => { deltaA: bigint; deltaB: bigint; lpt: bigint; newLiquidity: bigint; newReserveA: bigint; newReserveB: bigint }; slippage: (bidAmount: bigint, reserveBid: bigint, reserveAsk: bigint, feeRatio: bigint, taxRatio: bigint) => bigint; swap: (bidAmount: bigint, reserveBid: bigint, reserveAsk: bigint, feeRatio: bigint, taxRatio: bigint) => { askAmount: bigint; newReserveAsk: bigint; newReserveBid: bigint; tax: bigint }; withdraw: (lpt: bigint, liquidity: bigint, reserveA: bigint, reserveB: bigint) => { deltaA: bigint; deltaB: bigint; newReserveA: bigint; newReserveB: bigint } } = ...
Type declaration
-
deposit: (deltaA: bigint, deltaB: bigint, reserveA: bigint, reserveB: bigint, liquidity: bigint) => { deltaA: bigint; deltaB: bigint; lpt: bigint; newLiquidity: bigint; newReserveA: bigint; newReserveB: bigint }
-
- (deltaA: bigint, deltaB: bigint, reserveA: bigint, reserveB: bigint, liquidity: bigint): { deltaA: bigint; deltaB: bigint; lpt: bigint; newLiquidity: bigint; newReserveA: bigint; newReserveB: bigint }
-
Parameters
-
deltaA: bigint
-
deltaB: bigint
-
reserveA: bigint
-
reserveB: bigint
-
liquidity: bigint
Returns { deltaA: bigint; deltaB: bigint; lpt: bigint; newLiquidity: bigint; newReserveA: bigint; newReserveB: bigint }
-
deltaA: bigint
-
deltaB: bigint
-
lpt: bigint
-
newLiquidity: bigint
-
newReserveA: bigint
-
newReserveB: bigint
-
extract: (a: bigint, b: bigint, reserveA: bigint, reserveB: bigint) => bigint[]
-
- (a: bigint, b: bigint, reserveA: bigint, reserveB: bigint): bigint[]
-
Parameters
-
a: bigint
-
b: bigint
-
reserveA: bigint
-
reserveB: bigint
Returns bigint[]
-
fee: (askAmount: bigint, feeRatio: bigint, taxRatio: bigint) => { askAmount: bigint; fee: bigint; tax: bigint }
-
- (askAmount: bigint, feeRatio: bigint, taxRatio: bigint): { askAmount: bigint; fee: bigint; tax: bigint }
-
Parameters
-
askAmount: bigint
-
feeRatio: bigint
-
taxRatio: bigint
Returns { askAmount: bigint; fee: bigint; tax: bigint }
-
askAmount: bigint
-
fee: bigint
-
tax: bigint
-
inverseSwap: (askAmount: bigint, reserveBid: bigint, reserveAsk: bigint, feeRatio: bigint, taxRatio: bigint) => bigint
-
- (askAmount: bigint, reserveBid: bigint, reserveAsk: bigint, feeRatio: bigint, taxRatio: bigint): bigint
-
Parameters
-
askAmount: bigint
-
reserveBid: bigint
-
reserveAsk: bigint
-
feeRatio: bigint
-
taxRatio: bigint
Returns bigint
-
rake: (amount: bigint, bidReserve: bigint, askReserve: bigint, feeRatio: bigint, taxRatio: bigint) => bigint
-
- (amount: bigint, bidReserve: bigint, askReserve: bigint, feeRatio: bigint, taxRatio: bigint): bigint
-
Parameters
-
amount: bigint
-
bidReserve: bigint
-
askReserve: bigint
-
feeRatio: bigint
-
taxRatio: bigint
Returns bigint
-
sided_deposit: (deltaA: bigint, deltaB: bigint, reserveA: bigint, reserveB: bigint, liquidity: bigint, feeRatio: bigint, taxRatio: bigint) => { deltaA: bigint; deltaB: bigint; lpt: bigint; newLiquidity: bigint; newReserveA: bigint; newReserveB: bigint }
-
- (deltaA: bigint, deltaB: bigint, reserveA: bigint, reserveB: bigint, liquidity: bigint, feeRatio: bigint, taxRatio: bigint): { deltaA: bigint; deltaB: bigint; lpt: bigint; newLiquidity: bigint; newReserveA: bigint; newReserveB: bigint }
-
Parameters
-
deltaA: bigint
-
deltaB: bigint
-
reserveA: bigint
-
reserveB: bigint
-
liquidity: bigint
-
feeRatio: bigint
-
taxRatio: bigint
Returns { deltaA: bigint; deltaB: bigint; lpt: bigint; newLiquidity: bigint; newReserveA: bigint; newReserveB: bigint }
-
deltaA: bigint
-
deltaB: bigint
-
lpt: bigint
-
newLiquidity: bigint
-
newReserveA: bigint
-
newReserveB: bigint
-
slippage: (bidAmount: bigint, reserveBid: bigint, reserveAsk: bigint, feeRatio: bigint, taxRatio: bigint) => bigint
-
- (bidAmount: bigint, reserveBid: bigint, reserveAsk: bigint, feeRatio: bigint, taxRatio: bigint): bigint
-
Parameters
-
bidAmount: bigint
-
reserveBid: bigint
-
reserveAsk: bigint
-
feeRatio: bigint
-
taxRatio: bigint
Returns bigint
-
swap: (bidAmount: bigint, reserveBid: bigint, reserveAsk: bigint, feeRatio: bigint, taxRatio: bigint) => { askAmount: bigint; newReserveAsk: bigint; newReserveBid: bigint; tax: bigint }
-
- (bidAmount: bigint, reserveBid: bigint, reserveAsk: bigint, feeRatio: bigint, taxRatio: bigint): { askAmount: bigint; newReserveAsk: bigint; newReserveBid: bigint; tax: bigint }
-
Parameters
-
bidAmount: bigint
-
reserveBid: bigint
-
reserveAsk: bigint
-
feeRatio: bigint
-
taxRatio: bigint
Returns { askAmount: bigint; newReserveAsk: bigint; newReserveBid: bigint; tax: bigint }
-
askAmount: bigint
-
newReserveAsk: bigint
-
newReserveBid: bigint
-
tax: bigint
-
withdraw: (lpt: bigint, liquidity: bigint, reserveA: bigint, reserveB: bigint) => { deltaA: bigint; deltaB: bigint; newReserveA: bigint; newReserveB: bigint }
-
- (lpt: bigint, liquidity: bigint, reserveA: bigint, reserveB: bigint): { deltaA: bigint; deltaB: bigint; newReserveA: bigint; newReserveB: bigint }
-
Parameters
-
lpt: bigint
-
liquidity: bigint
-
reserveA: bigint
-
reserveB: bigint
Returns { deltaA: bigint; deltaB: bigint; newReserveA: bigint; newReserveB: bigint }
-
deltaA: bigint
-
deltaB: bigint
-
newReserveA: bigint
-
newReserveB: bigint
Slippage rate describes how price changes It's decimalized by 9