Let $B = \bigoplus_{i \in \mathbb Z}B_i$ be a $\mathbb Z$-graded integral domain. Given $f \in B$ define $\deg: B \rightarrow \mathbb Z \cup \{-\infty\}$ by $$\deg(f) = \mathrm{maxSupp}{(f)} \text{ if } f \neq 0 \text{ and } \deg(0) = -\infty $$
Note that elements of $B_i$ are homogeneous and each $f \in B$ has a unique decomposition $f = \sum_{j \in \mathbb Z} f_j, f_j \in B_j.$
A function $f$ is homogeneous if it can be written as sum of monomials of different degrees.
I am trying to prove that $B_0$ is algebraically closed in $B.$
I want to show that $B_0$ is algebraically closed in $B.$ Which means that we want to show that $B_0$ is equal to its algebraic closure $\bar{B_0}$, where the algebraic closure of $B_0$ in $B$ is the subring $\bar{B_0}$ consisting of all $b\in B$ that are algebraic over $B_{0}.$ And $b\in B$ is algebraic over $B_0$ means that there exists a polynomial, say $f(b) \in B_0[x]$, i.e. with coefficients in $B_0$ such that $f(b) = 0$.
Now, assume by contradiction that $b\in B\setminus B_0$ such that $b \neq 0$ and $\deg b \neq 0$ and $b$ is algebraic over $B_0.$
Since $b$ is algebraic over $B_0,$ then there exists $f(b) \in B_0[x]$ such that $f(b) = 0$ i.e., there exists $c_0, c_1, \dots , c_t \in B_0$ with $c_t \neq 0$ such that $$f(b) = \sum_{j=0}^t c_jb^j = 0 \quad (1)$$
But since $b\in B$ then $$b=\sum_{i\in \Bbb Z}b_i \quad (2)$$ i.e. $b_i$ is the $i$-the homogeneous component of $b.$ Since $b$ has some non-zero component in a positive degree by assumption, let $m$ be the largest positive integer for which $b_m\ne0$ (if $b$ has no non-zero component in positive degree we take $m$ to be the minimum integer with $b_m\ne0$)
Now, substituting from $(2)$ into $(1)$ we get $$f(b) = \sum_{n=0}^t c_n(\sum_{i\in \Bbb Z}b_i)^n = 0 \quad (3)$$
But then the term $(b_m)^n$ has degree $mn$ and there is exactly one of it because other nonzero $b_i$ have lower degree (note that degrees of $c_n$'s are $0$ because they are in $B_0$). Now, since $B$ is an integral domain, then $c_n(b_m)^n \neq 0 $ because both of $c_n,(b_m)^n$ not equal $0.$ In particular, this means $f(b)$ can not be zero as it is not zero in the $mn$-th component which is a contradiction.
But I got a hint that I have to show that the values of $\deg(b^n), n \geq 0,$ are distinct.
So I modified the proof above (which I understand with the help of a proof given by @Leoli) to the following:
$\deg \sum_{i=0}^{n-1} c_ib^i \leq \max_{0 \leq i \leq (n-1)} \deg(c_i b^i) \leq \max_{0 \leq i \leq (n-1)} \deg(b^i) = \max_{0 \leq i \leq (n-1)} \{im \} = (n-1)m$
Where the first inequality by property $3$ of $\deg$ we proved before and the second inequality because $\deg c_i = 0$ and the equality before last because $\operatorname {maxSupp}b$ is $m.$
But $\deg c_nb^n = nm \neq 0$ because $B$ is an integral domain and $c_n \neq 0$ and $(b_m)^n \neq 0.$
Therefore, the maxSupp term in $\sum_{i=0}^{n-1} c_ib^i$ does not cancel the maxSupp term in $ c_nb^n$
But $\sum_{i=0}^{n} c_ib^i = 0,$ then $ mn = \deg c_nb^n = \deg \sum_{i=0}^{n} c_ib^i = \deg (0) = -\infty$
A contradiction.
I feel like my proof is not ordered well, could someone criticize it and give me a more elegant proof.