Skip to content

FIP-2#95

Merged
Joeysantoro merged 11 commits intomasterfrom
FIP-2
Apr 30, 2021
Merged

FIP-2#95
Joeysantoro merged 11 commits intomasterfrom
FIP-2

Conversation

@Joeysantoro
Copy link
Contributor

@Joeysantoro Joeysantoro commented Apr 21, 2021

EDIT: added the TribeDripper

Adds three contracts:

  • EthReserveStabilizer which allows for exchanging FEI for ETH at a usd conversion rate
  • EthPCVDripper which can send in the ETH to the reserve stabilizer in batches over time
  • TribeDripper sends TRIBE to the FeiRewardsDistributor to smoothen the front-loading of rewards

The FeiRewardsDistributor calculates the amount to release every week by taking the total balance of TRIBE and subtracting unreleased future rewards.
When a new TRIBE airdrop happens, it frontloads all the rewards for the weeks that have already passed into the first week.
For FIP-2 this would lead to 6x rewards in week 1 (1x base rewards + 100% boost x 5 drips) instead of 2x.

The TribeDripper drips in 47m, 31m, and 22m TRIBE each over the first 3 weeks to smoothen the distribution.

Week 1: 1x base rewards + 47% boost x 5 drips = ~3.35x
Week 2: 1.47x base rewards + 31% x 6 drips = ~3.33x
Week 3: 1.78x base rewards + 22% x 7 drips = ~3.32x
Week 4+: 2x base rewards

These would be voted on per FIP-2:
https://tribe.fei.money/t/fip-2-fei-redemption-tribe-staking/3033

uint256 public amountToDrip;

event Dripped(uint256 amount);
event Withdrawl(address indexed to, uint256 amount);
Copy link
Contributor

Choose a reason for hiding this comment

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

small typo here in the event name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link

Choose a reason for hiding this comment

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

nic


// ----------- State changing api -----------

function exchangeFeiForEth(uint256 feiAmount) external returns (uint256);
Copy link
Contributor

Choose a reason for hiding this comment

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

in the interface you probably want more generic names (a DaiReserverStabilizer with an exchangeFeiForEth function would be weird)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed it to exchangeFei

_initTimed();

// drip
payable(target).sendValue(amountToDrip);

Choose a reason for hiding this comment

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

Would be good to only make the transfer if the target’s balance is lower than some threshold.

@Joeysantoro Joeysantoro merged commit 83c11be into master Apr 30, 2021
@xklob xklob deleted the FIP-2 branch September 19, 2021 18:55
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.

5 participants

Comments