# TGE use cases
## Schedule. The phases go sequentally.
1. `Airdrop` - backdground phase. Whole TGE duration
2. `period 1. Auction deposit window` - the time window where users are able to deposit and withdraw the assets
3. `period 2. Auction withdraw window` - the time window when users are able only withdraw assets (one time only)
4. `period 3. lock(deposit) lp tokens` - the time window when user is able to lock the lp tokens in lockdrop contract to get some reward and withdraw locked tokens. Any anount. Unlimited times. The amount of reward depends on lock duration and locked tokens amount. The function for reward calculation if superlinear for the duration. That means `rewards for 100lp locked for 2months` > `rewads for 200lp locked for 1month`
5. `period 4. Withdraw locked lp tokens`. Lock lp tokens if closed. The only one withdrawal per lock duration. Max withdrawal amount is 50% locked.
## 1. Airdrop
1) User is an airdrop participant. Gets the airdropped tokens. Sends message `claim` to the `airdrop` contract. User gets cNRTN tokens. All cNTRN vested over 3 months
2) During the whole TGE duration user interacts with the `credits` contract by sending message `withdraw` to get vested NTRN (cNTRN gets burned)
Airdrop is pretty independent phase. The following scenarios should be pretty the same nevermind is user participant airdrop or not.
## 2. Scenarios
### Early quit Auction
1) `Period 1(deposit window)` user interacts with a `auction` cintract by sending a messages `deposit` to deposit some amount of USDC/ATOM or `withdraw` to withdraw any portion of deposited assets up to 100%. User is free to call `deposit` and `withdraw` method unlimited times during `period 1`
2) If at the end of the day 1 user has no any assest deposited then TGE is over for the user
### Vested lp tokens
1) `Period 1(deposit window)` user interacts with a `auction` cintract by sending a messages `deposit` to deposit some amount of USDC/ATOM or `withdraw` to withdraw any portion of deposited assets up to 100%. User is free to call `deposit` and `withdraw` method unlimited times during `period 1`
2) If at the and of day 1 user has any assest deposited then user is guaranteed to get some amout of future LP tokens.
3) `period 2(withdraw window) day 1` `deposit` message is unavaliable. User sends `withdraw` to withdraw up to 50% of deposited amount. Only one message per asset is allowed.
4) `period 2(withdraw window) day 2`. `deposit` still closed. If the user has withdawn assets, the withdraw in day 2 is closed. If the user has NOT withdawn assets, he can withdraw up 50%, max percentage decreases linary over the day.
5) To get into `period 3`. The permissionless message `set_pool_size` shold be called to calculate lp share for each user.
6) `period 3. lock lp tokens. day 1`. The user is able to lock the tokens by sending `lock_lp` msg to the `auction` contract and unlock them by sending `withdraw_lp` to the contract amount of times.
7) If the user does not have any locked tokens at the and of `period 3`. All users lp tokens are migrated to the vesting contract by executng permissionless method `transfer_to_vesting`. Vesting duration - 3 months. Users does not get any rewards.
8) After the end of the event and up to 3 months after. User is able to get the vested tokens by sending `claim` msg to the vesting contract.
### Locked all lp tokens
First 5 steps from previous scenario. But user has locked all the lp tokens.
1) The pools are being initialized with deposited liqudity with permissionless message `initialize_pool`
2) Now all the user's lp tokens are locked into the lockdrop contract.
3) Immediatly after pool initialization the user is able to get lock rewards by calling the method `claim_rewards_and_unlock_for_lockup` for every lock position
4) After lock duration of the position is exceed, the user can execute the same message one more time to unlock the locked tokens. It's possible to unlock the tokens and get the rewards in one message.
### Locked only part of lp tokens
Just a mix of two previous scenarios. User gets the rewards loke in the pervious one. And gets the tokens vested like in one berore previous
### Locked tokens as airdop partcipant
If the user is airdrop participant. During the execution `claim_rewards_and_unlock_for_lockup` user in addition to the rewards gets part(in amount equals `rewards size`) of `vested cNTRN` unvested immediately.
## Diagram
[diagram](https://www.plantuml.com/plantuml/uml/pLPHZzmq47xFhnYrGbeUM5eGBtr0FPtWX7IK2XtmSjB66yycrZbsv9dSTldrZ1sla-KEzlO1qKhLNkpnpFUDlo-PzyGgyDXR-14Hj24EPZkoyQwgsB15kBlv0GQ9COqPLDoGADK6rVTLrGO_3g1CqC4Fi38xu0vX90nWgAoNquw_h43-_HO3lleUhgQ0Tr0tLfc-havshmDgmoIxUyET3cfVWzenXbJ4-kOXPHS2BKAd2D1fr7FrhO1d3yV3y8Z4ii_-0HsjuIxzWWfutB76gN00_oW9leNUE-weagJLaUZLsAG6h9GxFAapzmWdbl5CXlSEL3wgSV1aM50vxVSfRiavLn3EER3-Ui6-HoB9Hd3l8WBL-z4nUEcwaQtrbALHRkOi0Dw-UVD5ZCa9KODo6l2JWDW5tyTcPkpJzQuJAA7z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