chimera-defi / SharedDeposit

13 stars 6 forks source link

Feat: Referral contract #22

Open chimera-defi opened 1 month ago

chimera-defi commented 1 month ago

Add a referral address management contract. Skeleton in https://github.com/chimera-defi/SharedDeposit/blob/main/contracts/v2/periphery/UserDepositHelper.sol

need to have a frontend contract which emits referrals addresses to account for inbound leads from upstream. e.g.

  1. website A lists Sgeth as a eth staking option, when users stake via their site, a event is emitted with their referral address.
  2. KOL/ twitter bro posts a referral link to sharedstake, users that stake via that link emit a referral address encoded in the link url accounting for referral fee kickback.

also need to sketch up how itll work offchain to make sure we have all the events needed to account for people trying to exploit the system by e.g. depositing and withdrawing instantly.