badger-multisig icon indicating copy to clipboard operation
badger-multisig copied to clipboard

Restitution 2.0

Open sajanrajdev opened this issue 1 year ago • 2 comments

Now that a new Restitution program has been approved via BIP, it must be implemented. Details of the decision can be found on the following forum post.

The implementation's spec must be defined.

sajanrajdev avatar Feb 27 '24 18:02 sajanrajdev

https://docs.google.com/document/d/1GGD4Se8GZNtTzaMUV5anDeYmruP0WtVEQAA-zxRabr0/edit

petrovska-petro avatar Mar 05 '24 15:03 petrovska-petro

Emissions Plan

It was decided to use Sablier as the platform to handle emissions for the following reasons:

  • It is free to use and very user friendly
  • Has cancellability from the sender (requirement) - canceller can even be a separate account if preferred but only available via script.
  • Transferability from the recipient (nice to have)
  • Allows for the creation of streams via CSV for time ranges in the future (requirement)
  • Test deployment of streams to the current 45 remBADGER holders costed 6.3m gas unit in Sepolia. This would equate to less than 0.1 ETH at current gas prices.
  • Has the Safe App integration and can already handle BADGER.

Specs

According to the technical specs 400k BADGER vests from months 7 to 18 with the ability to withdraw upon vesting, and 600k BADGER vests during months 9 to 12, also withdrawable upon vesting. This means that once the deposit period for the bremBADGER vault ends, a snapshot of the depositors and their deposited amount will be taken and streams will be created for each according to the following specs:

  • Shares of total are estimated as follows: (user deposit/total deposited)
  • Share of 400K to be distributed from September 18, 2024 to October 18, 2025.
  • Share of 600K to be distributed from November 18, 2024 to February 18, 2025.
  • If the program is found to breakeven according to the rules stablished, the treasury will cancel the streams.

This means that each user will receive 2 streams and will be able to claim their streamed BADGER along the way in this time ranges since it will be vested in a per second basis.

Testing

Creating the streams was tested through the app in Sepolia and found to work as expected. Test confirmations:

Future streams

  • 1m DAI streamed to 45 users according to the expected dates of the first stream: https://sepolia.etherscan.io/tx/0x7f62173b60e4dc7048dad7b0f66c4cd33d13c8bd2b63b62115fab89891b64503
  • Streams are cancelled before the distribution begins and the full amount is clawed back to the sender: https://sepolia.etherscan.io/tx/0x227ad7704125d4499d27eed9172f4a33a632c08c667db95001770fb7749826f4

Active streams

  • 1 Stream created for a user in a shorter timeframe in the future for testing: https://sepolia.etherscan.io/tx/0x70b0a2566b691ecca62fb9ab08820fea887a2c6e2818146a32f3115570902f54
  • A few moments after the stream began, the user performs a partial withdraw: https://sepolia.etherscan.io/tx/0xcb59858fc127b8b681f3b5f73b80a88a335eccd189789c65cbd416621e86858a
  • A few moments later, the owner cancels the stream: https://sepolia.etherscan.io/tx/0xc7cc73e16fa5922db2f5bad1479d0bc159463b07b217a92f2e18fcc637906c2a
  • Once cancelled, the recipient is able to withdraw the reminder that was streamed before the cancellation: https://sepolia.etherscan.io/tx/0xed796dc6ff3383060016f75ee777ca407c33185cbad6b70279304a01b3ad832e

Notes

  • If cancellation is desired, time will be of the essence since streams will continue until the very second they are cancelled. A quicker multisig could be used for this at the expense of having a lower security threshold.
  • Outside of this, handling the operation through the UI has proven efficient and safe. Cancellation scripts are advised for security intervention and to remove reliance on UI in case of inactivity. Setup scripts shouldn't be necessary unless it is desired to use a separate entity as a canceller.

sajanrajdev avatar May 09 '24 01:05 sajanrajdev

bremBADGER Deposits Snapshot and Streams

  • Analysis of all deposits performed on bremBADGER duirng the 2 week deposit period can be found here.
  • Data was imported from Etherscan's ERC20 Transfers into the locker.
  • The analysis led to the generation of two CSV files, one for each batch of Streams:
  • Streams were created in Sepolia to be tested using the CSV files from above:
    • 600K tx: https://sepolia.etherscan.io/tx/0x23d9fd58b04dee2b3a3e1435e0bc530544d75e403af3ff2ffaddc0435051caef
    • 400L tx: https://sepolia.etherscan.io/tx/0x8f2f317a78b44eb6fcd29950f3a8e26e09e60c5d226f47c3eb1eecd16dcf7cc7
    • All Sepolia streams can be reviewed from the UI using the following search.

Stream Parameters

  • Timelines and amounts can be reviewed on the Restitution 2.0 Forum Post
  • Streams are made cancellable by the creator (Treasury Vault)
  • Streams are made transferrable by each of the recepients

sajanrajdev avatar Jun 12 '24 20:06 sajanrajdev

  • 600K: https://etherscan.io/tx/0x99e8319946f7c111a6582e6ff5633d563ff38517c8ada9390243a0589b7aa6dc
  • 400K: https://etherscan.io/tx/0x1b7b9c372a1ee24c533f65dc41de0fd9063d5ef6337d6fc265eb99a0bd950da5

sajanrajdev avatar Jun 13 '24 17:06 sajanrajdev