Skip to content

0xlinus/aelin-subgraph

Repository files navigation

Aelin Subgraph

A Aelin subgraph for The Graph. Aelin is a fundraising protocol built on Ethereum.

Notifications

Notifications are a powerful feature that will allow Aelin to create a communication chanel with users in a reliable way. All notifications are design with a goal in mind: little-to-none work should be done on the client-side to transform chain data.

Rendering

Notifications are created in advanced, this means that the client will have to decide if a notification should be rendered depending on triggerStart and triggerEnd fields.
It's important to mention that all(*) notifications will be removed from the subgraph at certain point and therefore wont be possible to query them again from that point.
Some notifications might be stored forever depending on the context and certain conditions, ie: a pool is created but no one invests in it and no deal is created. As a consequence no event will be emitted to remove InvestmentWindowAlert and InvestmentWindowEnded

Filtering

Notifications can be easily filtered by target and type, for instance:
If a user has invested in PoolA, when all notifications from PoolA are pulled from the subgraph, the client will have to show only those relevant for the user, and in this case, since the user is (only) an investor, then the client should filter by target: Investor

Entity Fields


NameTypeDescription
idIDaddress - NotificationType
address could be a poolAddress, dealAddress, or a userAddress
messageStringThe notification message
type
enum NotificationType {
	InvestmentWindowAlert
	InvestmentWindowEnded
	DealProposed
	HolderSet
	SponsorFeesReady
	VestingCliffBegun
	WithdrawUnredeemed
	DealTokensVestingBegun
	AllDealTokensVested
}
Depending on the type field, the client-side will
decide if the message needs to be adapted or changed.
target
enum NotificationTarget {
	Investor
	Sponsor
	Holder
}
Since all notifications types and targets from a certain Pool
will be queried from the subgraph, the client will need a
way to filter them depending on the user type
(investor, sponsor, holder)
triggerStartBigIntNotification should be visible to the client only if the current
time has passed triggerStart
triggerEndBigIntNotification should be NOT be visible to the client if the current
time has passed triggerEnd
poolPoolCreatedContain all the information of the pool related to the notification

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •