Search…
Contract Architecture
The Endaoment ecosystem uses several contracts to govern the movement of finances between DAFs and organizations:

Administration:

EndaomentAdmin.sol

In order to comply with US nonprofit regulations and increase system security, Endaoment uses several different Admin accounts to manage actions throughout the gifting and grantmaking processes.
The EndaomentAdmin contract creates the Roles necessary to execute the oversight of the Endaoment ecosystem, as well as providing for the ability to change or pause the current holder of a given role.
Several "getter" functions are also available to allow for querying of current role status or holder.

EndaomentAdminStorage.sol

To prevent an attacker from deploying their own EndaomentAdmin contract and representing themselves as the EndaomentAdmin, both FundFactory and OrgFactory use EndaomentAdminStorage to allow Fund and Org contracts to keep a record of the current and correct EndaomentAdmin contract for overseeing actions.

Administratable.sol

Provides an interface containing key modifiers for administering the FundFactory and OrgFactory that reference the EndaomentAdmin contract.

Factories:

FundFactory.sol

Provides methods for creating/deploying a new Fund contract. Methods are also available for retrieving the total number of Funds deployed by the factory and the address of any given Fund at a specific Index position in the list of created Funds[].

OrgFactory.sol

Provides methods for creating/deploying a new Org contract. Methods are also available for retrieving the total number of Orgs deployed by the factory and the address of any given Org at a specific Index position in the list of created Orgs[].

Contracts:

Fund.sol

Provides all methods for the administration of any specific Fund in the Endaoment ecosystem.
Includes a Grants mapping that allows for the manager to create a new Grant recommendation data struct whereby they provide a recipient organization address to send funds from their DAF. Any new Grant must have a recipient that was created by declared OrgFactory role in the enumerated EndaomentAdmin. If approved, the amount of tokens prescribed in the Grant struct is transferred to the desired recipient.

Org.sol

Provides all methods for the administration of any specific Org in the Endaoment ecosystem.
Includes a Claims mapping that allows for any address to create a new Claim data struct whereby they provide a orgWallet address and contact info. If a Claim is approved, a subset of Admin accounts can release granted funds from the Org contract to the desired wallet via the cashOutOrg() method.
Last modified 2mo ago
Export as PDF
Copy link