Rena V2 Weekly Dev Report #5

Rena Finance
3 min readAug 21, 2022

--

With the merge fast approaching and macro markets rallying, it seems to be a good time to build! This week we have covered a lot of ground on testing the rDistributor and rRewarder contracts. Let’s dive in:

Weekly Task Summary

  • Write rDistributor UniV3 version
  • rRewarder requirements
  • rRewarder contract code
  • Write more tests

What Was Achieved?

rDistributor

This week caught up with the rDistributor. We modified the original rDistributor contracts to work with UniSwapV3 pairs.

The original version used the “getReserves” function specific to UniV2 pairs (and to RenaV2). With the modified version, we will be able to fetch the token reserves for both types of uniswap pairs by checking the balance of the pair in the token contracts directly.

Finally, for the rDistributor we wrote some tests!

We identified 16 requirements of the rDistributor, out of which 15 requirements are already covered. rDistributor has been linked with 16 requirements, 15 of which are covered.

rDistributor Requirements

Blackbox (functional) tests for rDistributor

rLPMigration

rLPMigration has been linked with 15 requirements, all 15 of which are covered.

Requirements for rLPMigration

Blackbox (functional) tests for rLPMigration

RenaV2Wrapper

RenaV2Wrapper has been linked with 23 requirements, and we’ve covered all 23.

Requirements for RenaV2Wrapper

Blackbox (functional) tests for RenaV2Wrapper

Just in case you’re wondering — why write so many requirements and tests?

Tests and requirements bundled together can give a complementary view of the system at hand. Thinking about a system from a testing perspective is key, and functional tests complement it as they crystallize the vision of how a system should behave under given conditions.

Carry over

Requirements for rRewarder and its contract code have been moved to the next week. During the last Rena team discussion, we reached a consensus on the fact that the rRewarded documentation was not quite explicit and should be re-written.

Next week’s target

  • Test rBonds
  • Test rStakingV2
  • Test rBalancer
  • Setup testing environment for frontend integration

Thank you for reading our Rena V2 report! We’ll be back next week for another update for week #6.🙌

--

--

No responses yet