---
# System prepended metadata

title: 'Liquidity For Staked Delegations:star2:'

---

# Liquidity For Staked Delegations:star2: 

I was recently trying to delegate some ATOMS, on seeing the list of validators, it's really hard to decide which one to choose because almost all of them have 100% availability, less than 10% have been slashed ever and the only criteria to judge is commision. So the validators with lowest commision wins. Now this is unfair to small staking buisnesses who are just starting, they lose easily to big buisnesses like `coinbase` staking service because they can work with 0% commision. Its essential for valuable decentralisation to enable small buisnesses.**We need a more expressive way to judge a validator.**

## Idea 

Delegators delegate via purchasing shares of a finite pool from validators. Let's call these fungible tokens `TATIC`.As soon as you delegate to a validator you are issued `TATIC` based on an exchange rate of `MATIC/TATIC` pair. As you accrue value the exchange rate indicates that you can now withdraw more `MATIC` for each `TATIC` and when you get slashed you withdraw less `MATIC` for your `TATIC`. 

The advantage of this is now you can just transfer your `TATIC` to someone, you dont have to wait for withdraw and redelegate. Redelegation is modeled as the burning of `TATIC` combined with the issuance of new `TATIC` corresponding to the validator that received the redelegation. Newly issued `TATIC` resulting from a redelegation are non-transferable (frozen) for one unbonding period to make sure delegators remain accountable for infractions that were committed by the validator they redelegated away from. 


Eg: You buy tokens from validator specific pool when 1 Matic/ 1 PoolShare. When validator gets rewarded the exchange rate becomes 1 Matic/ 0.9 PoolShare. So you get more matic for same poolshares ie you are rewarded. For slashing 1 Matic/ 1.1 PoolShare ie you are slashed. This saves us all the accounting.

## Advantages
1.There are infinite possilities(compound/#Defi) due to the increase in liquidity. 
2. More importantly market-based mechanism of ranking validator quality because delegation shares will need to be priced based upon their liquidity and the slashing risk associated with validators.
3. Better user experience 
4. Gas saving 


## Attack Vectors 
- Validator could short his shares and then double sign :(
- Maintain Ratio V:D stake.


## Validator<->Delegation Shares

Model 1

- Delegators buy at the current exchange rate, which is 1:1 at the begening, later at point it depends on amount of rewards generated.

-  Rewards: given at the time of exits, which are calculated at the current exchage rate.

-  There is no need to calculate rewards explicitly, since rewards are automatically added to the delegation pool. Due to the same validator's Delegated power keep increasing.

-  Slashing: slash whole current delegator amount, if someone is coming right before the slashing then assumption is that it's their fault to not have checked for frauds.

-  Need to think about how to slash amount in exit period. let's some one started exit before slashing point, then they shouldn't be slashed.
    - One approach is to have exits in batched so that we can slash the whole batch, with some arbitrary number we can divide withdraw_delay have those many exit batch  
    - Once the user starts exit put them into a tree with key as start-end epoch and then do range updates while slashing.

- Filtering out it really hard due to diversification amounts will be small and iteration is needed to filter out.

- If we don't slashing those who are exiting then, watchers or validators can chip in delegators to exit and make some kinda offchain deals.

- Delegation ratio: In order to avoid attack vector mentioned above we need to maintain certain ration between validator:delegator amount.

from ctoken
exchangeRate = (underlyingBalance +totalBorrowBalancea − reserves a)/cTokenSupplya
  
 let's say someone is exiting before checkpoint then he looses that reward, which is obviously dependent on delegators exiting.
 
