FeedProjects
Developers
Settings
🎉 A new chapter begins: Boardroom has joined Agora
Learn more
protocol logo
Explore / Projects
Balancer

Proposals

Discussions

Members

Information

Create Proposal

Balancer

ProposalsDiscussionsMembersInformation
Proposal
Back to Proposals
closedEnded 3 years ago · Snapshot (Offchain)

[BIP-255] Approve Cron Fi TWAMM Relayer

By 0x9f74...0dD68e

Payload with PR

https://github.com/BalancerMaxis/multisig-ops/pull/144

Background

We have been researching & developing TWAMMs built on top of Balancer as a custom pool. Balancer grants DAO has been extremely supportive of our endeavor and we’re excited to launch next month. You can learn more about the project here: https://github.com/Cron-Finance/Cron-Finance

Motivation

TWAMMs and Balancer pools in general are complicated to interact with in absence of a UX. We are building a dedicated relayer that abstracts the complexity from the end-user and provides safety in terms of slippage protection and error handling.

We want to do this all from a smart contract thus maintaining the advantages of a fully on-chain protocol: permissionless, composability, & decentralization. Additionally, we don’t want our protocol to be restricted by hostile regulatory regimes that target Web UX.

Interactions

Below are the two ways to interact with the core TWAMM contracts today via Gnosis Safe or Etherscan. Without a dedicated UX, the user would have to know how to set slippage, handle errors, etc themselves.

Unsafe + complex: interact through Vault

A user would have to create tuples and be knowledgeable of Balancer’s Vault infrastructure. Furthermore, they would have to abi.encode data specific to TWAMM like intervals, swap type, etc.

cron1.png

Safe + intuitive: relayer/periphery contract

Here the user would specify very simple inputs (similar to in a UX) in order to execute a long-term swap.

cron2.png

Development

We will create our Relayer, similar to Balancer Relayer (https://github.com/balancer/balancer-v2-monorepo/blob/master/pkg/standalone-utils/contracts/relayer/BalancerRelayer.sol), but with added abstractions for the following functions:

  • function longTermSwap
  • function shortTermSwap
  • function partnerSwap
  • function join
  • function exit
  • function withdraw
  • function cancel

cron3.jpg

Security

  • The core contracts have been fully audited by SpearbitDAO: https://github.com/spearbit/portfolio/blob/master/pdfs/CronFinance-Spearbit-Security-Review.pdf
  • The periphery contract will be audited by SpearbitDAO as well.
  • Users of this relay will have to explicitly approve the relayer before using it.
  • Relayer actions will be scoped to: join, exit, swap
  • We will scope the relay to only interact with TWAMM pools recognized by our Factory contract:

cron4.png

Tradeoffs

Balancer

⛔️ Attack vectors: addressed in the security section
✅ Ease of use for a new pool type
✅ Expand Balancer pool interaction to fully on-chain
✅ Exploring & developing the Relayer ecosystem for other teams, integrators

Cron

⛔️ Increase of attack surface
✅ Vastly improved on-chain UX
✅ Moat against copycats, vampire forks
✅ Simplified onboarding of different user personas: whales, protocols, 3rd party front-ends

Users, integrators

⛔️ Additional gas costs of the periphery
✅ Interact directly without UX/3rd party
✅ Ease of use and integration    
✅ Safety and slippage checks are done by the periphery    
✅ Abstract TWAMM complexity

Governance

We would like governance to approve this relayer so we can onboard users faster, improve user experience, and reduce the complexity to interact with TWAMMs.

Relayer Information:

https://etherscan.io/address/0xE0Ca4DAc40d44D737f0d02B1F2B2D969731eCda9

Balancer’s architecture requires governance approval for CronFi: Relayer for these actions:

Vault Actions:

  • "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "0x78ad1b68d148c070372f8643c4648efbb63c6a8a338f3c24714868e791367653”

  • "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": "0xc149e88b59429ded7f601ab52ecd62331cac006ae07c16543439ed138dcb8d34"

  • "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": "0x7b8a1d293670124924a0f532213753b89db10bde737249d4540e9a03657d1aff”

Documentation:

https://docs.balancer.fi/concepts/advanced/relayers.html

Continue Reading
Connect Wallet to Add Note
0
Votes 121
VoterCast PowerVote & Rationale
0xAD99...2442CC
2.897M

Yes, let's do it

0x9f74...0dD68e
246,731

Yes, let's do it

Llama
224,071

Yes, let's do it

0xff02...9E1751
201,222

Yes, let's do it

0x25B7...057Fa6
176,224

Yes, let's do it

SHOW MORE
VOTE POWER
0
Connect Wallet
Proposal Status
  • Thu April 20 2023, 06:00 pmVoting Period Starts
  • Mon April 24 2023, 06:00 pmEnd Voting Period
Current Results

1-Yes, let's do it

3.874M

2-Abstain

1.274

0%

3-No, this is not the way

0.052

0%
Quorum 3.874M/2M
DocumentationBrandingContact Us
Home
This Project is Currently Disabled

If you would like to enable it, please checkout below.

Boardroom Subscription

Sign up for an individual subscription (access all projects on the platform)

Subscribe
Enable Project

Enable the entire project for every user

Enable Project
Contact Us