NostraSwapPair

Code

//add link to code

Address

//add link to address

Events

Mint

event Mint(address indexed sender, uint amount0, uint amount1);

Emitted each time liquidity tokens are created via mint.

Burn

event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);

Emitted each time liquidity tokens are destroyed via burn.

Swap

event Swap(address indexed sender,  uint amount0In,  uint amount1In,  uint amount0Out,  uint amount1Out,  address indexed to, uint preArbK, uint postArbK);

Emitted each time a swap occurs via swap.

Sync

Emitted each time reserves are updated via mint, burn, swap, or sync.

Read-Only Functions

MINIMUM_LIQUIDITY

Returns 1000 for all pairs. See Minimum Liquidity.

factory

Returns the factory address.

token0

Returns the address of the pair token with the lower sort order.

token1

Returns the address of the pair token with the higher sort order.

getReserves

Returns the reserves of token0 and token1 used to price trades and distribute liquidity. See Pricing. Also returns the block.timestamp (mod 2**32) of the last block during which an interaction occured for the pair.

externalPool0

Returns address of the corresponding pair in a third-party DEX. See Arbitrage.

externalPool1

Returns address of the corresponding pair in a third-party DEX. See Arbitrage.

kLast

Returns the product of the reserves as of the most recent liquidity event.

limitRate

Returns the limitRate per second used to calculate oracle prices.

lpips

Returns the limitPriceImpactPerSecond array calculated from limitRate

State-Changing Functions

mint

Creates pool tokens.

burn

Destroys pool tokens.

swap

Swaps tokens. Refunds profit to to

skim

Transfer leftover balances to msg.sender

sync

Syncs reserves with balances

setLimitPriceImpact

Set limitRate and recalculate lpips array. Only timelock contract may call this.

Interface

ABI

//add abi

Last updated

Was this helpful?