Modules§
Macros§
Structs§
- Decrease
Spot Position Quote Result - Increase
LpPosition Quote Args - Increase
LpPosition Quote Result - Increase
Spot Position Quote Result - Liquidation
Prices - Swap
Instruction - Tuna
Spot Position Facade
Constants§
- COMPUTED_
AMOUNT - DEFAULT_
SLIPPAGE_ TOLERANCE_ BPS - HUNDRED_
PERCENT - INVALID_
ARGUMENTS - JUPITER_
QUOTE_ REQUEST_ ERROR - JUPITER_
SWAP_ INSTRUCTIONS_ REQUEST_ ERROR - MARKET_
MAKER_ FUSION - MARKET_
MAKER_ ORCA - TOKEN_A
- TOKEN_B
Functions§
- apply_
swap_ fee - apply_
tuna_ protocol_ fee - calculate_
tuna_ protocol_ fee - calculate_
tuna_ spot_ position_ protocol_ fee - get_
decrease_ spot_ position_ quote - Spot position decrease quote
- get_
increase_ lp_ position_ quote - get_
increase_ spot_ position_ quote - Spot position increase quote
- get_
lp_ position_ liquidation_ prices - Computes the liquidation prices for an existing position.
- get_
spot_ position_ liquidation_ price - Returns the liquidation price
- get_
tradable_ amount - Calculates the maximum tradable amount in the collateral token.
- reverse_
apply_ swap_ fee - reverse_
apply_ tuna_ protocol_ fee