Skip to content

Conversation

@scalahub
Copy link
Contributor

Contracts for LP and Sell Ergs.
Remaining contracts WIP

@scalahub scalahub changed the title Update eip-0014.md Add N2T contracts Jul 13, 2021
Copy link
Member

@oskin1 oskin1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please add yourself to the authors list.

{
val InitiallyLockedLP = 0x7fffffffffffffffL
val FeeDenom = 1000
val minStorageRent = 10000000L // this many number of nanoErgs are going to be permanently locked
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why permanently locked? Why LP can't redeem all the liquidity and destroy the pool? Otherwise unless we consider this locked reserves in deposit / redeem formulas there will be some portion of LP tokens that can never be returned.

Copy link
Contributor Author

@scalahub scalahub Jul 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redeem complete liquidity and destroying the pool can never happen even in the T2T contracts. The moment you have successor condition, the contract will fail if there is no successor, and so we will just let that small amount of LP stuck till miner can claim it. If we can modify the normal T2T contracts to accommodate destruction, we can port same logic here. We can think of adding more checks to allow complete LP redemption but that will make it more complex, so I suggest we leave it.

@oskin1 oskin1 marked this pull request as ready for review July 19, 2021 12:37
@oskin1 oskin1 merged commit 3ec23f1 into eip14 Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants